mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Disable MPTCP, add support for UBOND but segfault too so disable it
This commit is contained in:
parent
4942ead21f
commit
e0b85427b6
3 changed files with 45 additions and 2 deletions
|
@ -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")
|
||||
|
|
|
@ -214,6 +214,18 @@ end
|
|||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if nixio.fs.access("/usr/sbin/ubond") then %>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:UBOND password%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="ubond_password" placeholder="UBOND password" class="cbi-input-text" value="<%=uci:get("ubond","general","password")%>">
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:UBOND can replace Glorytun with connections with same latency%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if nixio.fs.access("/usr/sbin/openvpn") then %>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:OpenVPN key%></label>
|
||||
|
@ -247,6 +259,8 @@ end
|
|||
<% if nixio.fs.access("/usr/sbin/dsvpn") then %><option value="dsvpn" <% if uci:get("dsvpn","vpn","enable") == "1" then %>selected="selected"<% end %>>A Dead Simple VPN</option><% end %>
|
||||
<% elseif vpn == "mlvpn" then %>
|
||||
<% if nixio.fs.access("/usr/sbin/mlvpn") then %><option value="mlvpn" <% if uci:get("mlvpn","general","enable") == "1" then %>selected="selected"<% end %>>MLVPN</option><% end %>
|
||||
<% elseif vpn == "ubond" then %>
|
||||
<% if nixio.fs.access("/usr/sbin/ubond") then %><option value="ubond" <% if uci:get("ubond","general","enable") == "1" then %>selected="selected"<% end %>>UBOND</option><% end %>
|
||||
<% elseif vpn == "openvpn" then %>
|
||||
<% if nixio.fs.access("/usr/sbin/openvpn") then %><option value="openvpn" <% if uci:get("openvpn","omr","enabled") == "1" then %>selected="selected"<% end %>>OpenVPN</option><% end %>
|
||||
<%
|
||||
|
@ -261,6 +275,7 @@ end
|
|||
<% if nixio.fs.access("/usr/sbin/glorytun-udp") then %><option value="glorytun_udp" <% if uci:get("glorytun","vpn","enable") == "1" and uci:get("glorytun","vpn","proto") == "udp" then %>selected="selected"<% end %>>Glorytun UDP</option><% end %>
|
||||
<% if nixio.fs.access("/usr/sbin/dsvpn") then %><option value="dsvpn" <% if uci:get("dsvpn","vpn","enable") == "1" then %>selected="selected"<% end %>>A Dead Simple VPN</option><% end %>
|
||||
<% if nixio.fs.access("/usr/sbin/mlvpn") then %><option value="mlvpn" <% if uci:get("mlvpn","general","enable") == "1" then %>selected="selected"<% end %>>MLVPN</option><% end %>
|
||||
<% if nixio.fs.access("/usr/sbin/ubond") then %><option value="ubond" <% if uci:get("ubond","general","enable") == "1" then %>selected="selected"<% end %>>UBOND</option><% end %>
|
||||
<% if nixio.fs.access("/usr/sbin/openvpn") then %><option value="openvpn" <% if uci:get("openvpn","omr","enabled") == "1" then %>selected="selected"<% end %>>OpenVPN</option><% end %>
|
||||
<option value="none" <% if uci:get("openmptcprouter","settings","vpn") == "none" then %>selected="selected"<% end %>>None</option>
|
||||
<%
|
||||
|
@ -269,7 +284,7 @@ end
|
|||
</select>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%: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.%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue