From e0b85427b6889695ea01265f2ae59b054e20adca Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Sun, 27 Oct 2019 08:42:52 +0100 Subject: [PATCH] Disable MPTCP, add support for UBOND but segfault too so disable it --- .../luasrc/controller/openmptcprouter.lua | 27 +++++++++++++++++++ .../luasrc/view/openmptcprouter/wizard.htm | 17 +++++++++++- openmptcprouter-full/Makefile | 3 ++- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index aa09c70b7..cf88909d3 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -291,6 +291,10 @@ function wizard_add() vpn_port = 65201 vpn_intf = "mlvpn0" ucic:set("network","omrvpn","proto","dhcp") + elseif default_vpn == "ubond" then + vpn_port = 65201 + vpn_intf = "ubond0" + ucic:set("network","omrvpn","proto","dhcp") elseif default_vpn == "dsvpn" then vpn_port = 65011 vpn_intf = "tun0" @@ -384,6 +388,7 @@ function wizard_add() ucic:set("glorytun","vpn","host",server_ip) ucic:set("dsvpn","vpn","host",server_ip) ucic:set("mlvpn","general","host",server_ip) + ucic:set("ubond","general","host",server_ip) luci.sys.call("uci -q del openvpn.omr.remote") luci.sys.call("uci -q add_list openvpn.omr.remote=" .. server_ip) ucic:set("qos","serverin","srchost",server_ip) @@ -398,6 +403,7 @@ function wizard_add() ucic:save("openvpn") --ucic:commit("openvpn") ucic:save("mlvpn") + ucic:save("ubond") --ucic:commit("mlvpn") ucic:save("dsvpn") --ucic:commit("dsvpn") @@ -516,6 +522,26 @@ function wizard_add() ucic:save("mlvpn") ucic:commit("mlvpn") + -- Set UBOND settings + if default_vpn == "ubond" then + ucic:set("ubond","general","enable",1) + ucic:set("network","omrvpn","proto","dhcp") + else + ucic:set("ubond","general","enable",0) + end + + local ubond_password = luci.http.formvalue("ubond_password") + if ubond_password ~= "" then + ucic:set("ubond","general","password",ubond_password) + ucic:set("ubond","general","firstport","65201") + ucic:set("ubond","general","interface_name","ubond0") + else + --ucic:set("ubond","general","enable",0) + ucic:set("ubond","general","password","") + end + ucic:save("ubond") + ucic:commit("ubond") + -- Set OpenVPN settings local openvpn_key = luci.http.formvalue("openvpn_key") if openvpn_key ~= "" then @@ -570,6 +596,7 @@ function wizard_add() luci.sys.call("/etc/init.d/glorytun restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/glorytun-udp restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/mlvpn restart >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/ubond restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/openvpn restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/dsvpn restart >/dev/null 2>/dev/null") luci.sys.call("/etc/init.d/omr-tracker restart >/dev/null 2>/dev/null") diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index 909afbed3..cc6fe3e42 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -214,6 +214,18 @@ end <% end %> + <% if nixio.fs.access("/usr/sbin/ubond") then %> +
+ +
+ "> +
+
+ <%:UBOND can replace Glorytun with connections with same latency%> +
+
+
+ <% end %> <% if nixio.fs.access("/usr/sbin/openvpn") then %>
@@ -247,6 +259,8 @@ end <% if nixio.fs.access("/usr/sbin/dsvpn") then %><% end %> <% elseif vpn == "mlvpn" then %> <% if nixio.fs.access("/usr/sbin/mlvpn") then %><% end %> + <% elseif vpn == "ubond" then %> + <% if nixio.fs.access("/usr/sbin/ubond") then %><% end %> <% elseif vpn == "openvpn" then %> <% if nixio.fs.access("/usr/sbin/openvpn") then %><% end %> <% @@ -261,6 +275,7 @@ end <% if nixio.fs.access("/usr/sbin/glorytun-udp") then %><% end %> <% if nixio.fs.access("/usr/sbin/dsvpn") then %><% end %> <% if nixio.fs.access("/usr/sbin/mlvpn") then %><% end %> + <% if nixio.fs.access("/usr/sbin/ubond") then %><% end %> <% if nixio.fs.access("/usr/sbin/openvpn") then %><% end %> <% @@ -269,7 +284,7 @@ end
- <%:Set the default VPN used for UDP and ICMP when ShadowSocks is enabled, for all traffic if ShadowSocks is disabled.%> + <%:Set the default VPN used for UDP and ICMP when ShadowSocks is enabled, for all traffic if ShadowSocks is disabled.%> <%:All VPN available here can do aggregation over MPTCP or using own internal method.%>
diff --git a/openmptcprouter-full/Makefile b/openmptcprouter-full/Makefile index 77b8f6549..6dd7ae1a2 100644 --- a/openmptcprouter-full/Makefile +++ b/openmptcprouter-full/Makefile @@ -76,8 +76,9 @@ MY_DEPENDS := \ kmod-usb-net-huawei-cdc-ncm kmod-usb-net-rndis kmod-usb-net-cdc-ether kmod-usb-net-ipheth usbmuxd \ kmod-rt2800-usb kmod-rtl8xxxu kmod-rtl8192cu kmod-net-rtl8192su \ luci-proto-qmi wpad-basic kmod-mt7601u kmod-rtl8187 \ - luci-app-mlvpn \ softethervpn5-client softethervpn5-server wireguard + +# luci-app-mlvpn ubond \ # kmod-ath9k kmod-ath9k-htc # (TARGET_x86||TARGET_x86_64):open-vm-tools \