1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add MPTCP over Wireguard VPN support

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-03-03 11:30:23 +01:00
parent 585a3ccfa7
commit 4949749b55
5 changed files with 189 additions and 41 deletions

View file

@ -497,6 +497,11 @@ function wizard_add()
ucic:save("openmptcprouter")
end
-- Get VPN used for MPTCP over VPN
local mptcpovervpn_vpn = luci.http.formvalue("mptcpovervpn_vpn") or "wireguard"
ucic:set("openmptcprouter","settings","mptcpovervpn",mptcpovervpn_vpn)
ucic:save("openmptcprouter")
-- Get Proxy set by default
local default_proxy = luci.http.formvalue("default_proxy") or "shadowsocks"
if default_proxy == "shadowsocks" and serversnb > 0 and serversnb > disablednb then

View file

@ -365,6 +365,23 @@
</div>
</div>
</fieldset>
<fieldset class="cbi-section" id="mptcpovervpn">
<legend><%:MPTCP over VPN settings%></legend>
<div class="cbi-section-descr"><%:MPTCP over VPN should be used only when Multipath TCP is blocked on a connection.%></div>
<div class="cbi-value">
<label class="cbi-value-title"><%:MPTCP over VPN%></label>
<div class="cbi-value-field">
<select class="cbi-input-select" name="mptcpovervpn_vpn" size="1">
<% if nixio.fs.access("/etc/init.d/openvpn") then %><option value="openvpn" <% if uci:get("openmptcprouter","settings","mptcpovervpn") == "openvpn" then %>selected="selected"<% end %>>OpenVPN</option><% end %>
<% if nixio.fs.access("/usr/bin/wg") then %><option value="wireguard" <% if uci:get("openmptcprouter","settings","mptcpovervpn") == "wireguard" or uci:get("openmptcprouter","settings","mptcpovervpn") == nil then %>selected="selected"<% end %>>WireGuard</option><% end %>
</select>
<br />
<div class="cbi-value-description">
<%:Set VPN to use for MPTCP over VPN.%>
</div>
</div>
</div>
</fieldset>
</span>
<hr />
<fieldset class="cbi-section" id="laninterfaces">