diff --git a/glorytun/init b/glorytun/init index 969116be7..0aa2ae16b 100755 --- a/glorytun/init +++ b/glorytun/init @@ -65,7 +65,7 @@ start_instance() { procd_append_param command \ retry count -1 const 5000000 \ timeout 9000 \ - keepalive count 3 idle 10 interval 1 + keepalive count 5 idle 60 interval 2 procd_set_param respawn 0 30 0 procd_set_param file /tmp/${PROG_NAME}-${1}.key diff --git a/luci-app-mptcp/Makefile b/luci-app-mptcp/Makefile new file mode 100644 index 000000000..77306e5aa --- /dev/null +++ b/luci-app-mptcp/Makefile @@ -0,0 +1,14 @@ +# +# Copyright (C) 2018 Ycarus (Yannick Chabanois) +# +# + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=LuCI Support for MPTCP + +PKG_LICENSE:=Apache-2.0 + +include ../luci/luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-mptcp/luasrc/controller/mptcp.lua b/luci-app-mptcp/luasrc/controller/mptcp.lua new file mode 100644 index 000000000..477c1bcfc --- /dev/null +++ b/luci-app-mptcp/luasrc/controller/mptcp.lua @@ -0,0 +1,7 @@ +module("luci.controller.mptcp", package.seeall) + +function index() + entry( + {"admin", "network", "mptcp"}, + cbi("mptcp"), _("MPTCP"), 55) +end diff --git a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua new file mode 100644 index 000000000..079755b2e --- /dev/null +++ b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua @@ -0,0 +1,43 @@ +local net = require "luci.model.network".init() +local sys = require "luci.sys" +local ifaces = sys.net:devices() +local m, s, o + +m = Map("network", translate("MPTCP"), translate("Networks MPTCP settings")) + +s = m:section(TypedSection, "globals") +local mtcpg = s:option(ListValue, "multipath", translate("Multipath TCP")) +mtcpg:value("enable", translate("enable")) +mtcpg:value("disable", translate("disable")) +local mtcpck = s:option(ListValue, "mptcp_checksum", translate("Multipath TCP checksum")) +mtcpck:value("enable", translate("enable")) +mtcpck:value("disable", translate("disable")) +local mtcppm = s:option(ListValue, "mptcp_path_manager", translate("Multipath TCP path-manager")) +mtcppm:value("default", translate("default")) +mtcppm:value("fullmesh", translate("fullmesh")) +mtcppm:value("ndiffports", translate("ndiffports")) +mtcppm:value("blinder", translate("blinder")) +local mtcpsch = s:option(ListValue, "mptcp_scheduler", translate("Multipath TCP scheduler")) +mtcpsch:value("default", translate("default")) +mtcpsch:value("roundrobin", translate("round-robin")) +mtcpsch:value("redundant", translate("redundant")) +local mtcpsyn = s:option(Value, "mptcp_syn_retries", translate("Multipath TCP SYN retries")) +mtcpsyn.datatype = "uinteger" +mtcpsyn.rmempty = false +local congestion = s:option(ListValue, "congestion", translate("Congestion Control")) +local availablecong = sys.exec("sysctl net.ipv4.tcp_available_congestion_control | awk -F'= ' '{print $NF}'") +for cong in string.gmatch(availablecong, "[^%s]+") do + congestion:value(cong, translate(cong)) +end + +s = m:section(TypedSection, "interface", translate("Interfaces Settings")) +mptcp = s:option(ListValue, "multipath", translate("Multipath TCP"), translate("One interface must be set as master")) +mptcp:value("on", translate("enabled")) +mptcp:value("off", translate("disabled")) +mptcp:value("master", translate("master")) +mptcp:value("backup", translate("backup")) +mptcp:value("handover", translate("handover")) +mptcp.default = "off" + + +return m diff --git a/openmptcprouter-full/Makefile b/openmptcprouter-full/Makefile index 439e0ebf9..e9b46bc94 100644 --- a/openmptcprouter-full/Makefile +++ b/openmptcprouter-full/Makefile @@ -63,6 +63,7 @@ MY_DEPENDS := \ luci-mod-admin-full luci-app-firewall luci-app-glorytun luci-app-shadowsocks-libev luci-app-unbound luci-theme-openmptcprouter luci-base \ luci-app-nginx-ha luci-app-omr-tracker luci-app-qos \ luci-app-vnstat omr-quota luci-app-omr-quota \ + luci-app-mptcp \ speedtestc \ ip6tables-mod-nat luci-proto-ipv6 ethtool