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 VPN

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-10-26 09:16:28 +02:00
parent 85ba3b7c19
commit a080b959ba
5 changed files with 180 additions and 5 deletions

View file

@ -101,6 +101,7 @@ function wizard_add()
ucic:set("network","wan" .. i,"interface")
ucic:set("network","wan" .. i,"ifname",defif)
ucic:set("network","wan" .. i,"proto","static")
ucic:set("openmptcprouter","wan" .. i,"interface")
if ointf ~= "" then
ucic:set("network","wan" .. i,"type","macvlan")
ucic:set("macvlan","wan" .. i,"macvlan")
@ -202,6 +203,10 @@ function wizard_add()
ucic:delete("openmptcprouter",intf,"lc")
ucic:save("openmptcprouter")
local multipathvpn = luci.http.formvalue("multipathvpn.%s.enabled" % intf) or "0"
ucic:set("openmptcprouter",intf,"multipathvpn",multipathvpn)
ucic:save("openmptcprouter")
local downloadspeed = luci.http.formvalue("cbid.sqm.%s.download" % intf) or "0"
local uploadspeed = luci.http.formvalue("cbid.sqm.%s.upload" % intf) or "0"

View file

@ -281,8 +281,11 @@ end
<%
for _, iface in ipairs(net:get_networks()) do
local ifname = iface:name()
local multipath = uci:get("network",ifname,"multipath")
if multipath ~= "off" then
--local multipath = uci:get("network",ifname,"multipath")
local multipath = uci:get("openmptcprouter",ifname,"multipath")
local multipathvpn = uci:get("openmptcprouter",ifname,"multipathvpn")
local vpn = uci:get("openmptcprouter",ifname,"vpn")
if (multipath ~= nil and multipath ~= "off" and vpn ~= "1") or multipathvpn == "1" then
%>
<div class="cbi-section-remove right">
<input type="submit" name="delete.<%=ifname%>" value="<%:Delete%>" class="cbi-button" />
@ -346,16 +349,26 @@ end
end
%>
<div class="cbi-value" data-index="5">
<label class="cbi-value-title"><%:MPTCP over VPN%></label>
<div class="cbi-value-field">
<input class="cbi-input-checkbox" type="checkbox" name="multipathvpn.<%=ifname%>.enabled" value="1" <% if uci:get("openmptcprouter",ifname,"multipathvpn") == "1" then %>checked<% end %> />
<br />
<div class="cbi-value-description">
<%:You can enable MPTCP over VPN if your provider filter Multipath TCP.%>
</div>
</div>
</div>
<div class="cbi-value" data-index="6">
<label class="cbi-value-title"><%:Enable SQM%></label>
<div class="cbi-value-field">
<input class="cbi-input-checkbox" type="checkbox" name="cbid.sqm.<%=ifname%>.enabled" value="1" <% if uci:get("sqm",ifname,"enabled") == 1 then %>checked<% end %> />
<input class="cbi-input-checkbox" type="checkbox" name="cbid.sqm.<%=ifname%>.enabled" value="1" <% if uci:get("sqm",ifname,"enabled") == "1" then %>checked<% end %> />
<br />
<div class="cbi-value-description">
<%:You should disable SQM for LTE or any interfaces with variable speed.%>
</div>
</div>
</div>
<div class="cbi-value" data-index="6">
<div class="cbi-value" data-index="7">
<label class="cbi-value-title"><%:Download speed (Kb/s)%></label>
<div class="cbi-value-field">
<input type="text" name="cbid.sqm.<%=ifname%>.download" class="cbi-input-text" value="<%=download%>" data-type="uinteger">
@ -371,7 +384,7 @@ end
-->
</div>
</div>
<div class="cbi-value" data-index="7">
<div class="cbi-value" data-index="8">
<label class="cbi-value-title"><%:Upload speed (Kb/s)%></label>
<div class="cbi-value-field">
<input type="text" name="cbid.sqm.<%=ifname%>.upload" class="cbi-input-text" value="<%=upload%>" data-type="uinteger">