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

Merge pull request #240 from Ysurac/develop

sync
This commit is contained in:
suyuan 2022-05-29 12:10:32 +08:00 committed by GitHub
commit b616423bb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 86 additions and 61 deletions

View file

@ -9,6 +9,8 @@
local ifaces = sys.net:devices()
local ifttyu = nixio.fs.glob("/dev/ttyUSB*")
local ifttyc = nixio.fs.glob("/dev/cdc-wdm*")
local sqm = luci.sys.exec("opkg list-installed | grep -q luci-app-sqm && echo -n '1' || echo -n '0'")
local qos = luci.sys.exec("opkg list-installed | grep -q luci-app-qos && echo -n '1' || echo -n '0'")
menuentry = uci:get("openmptcprouter","settings","menu") or "openmptcprouter"
function device_notvirtual(dev)
if dev:match("^eth.*") or dev:match("^wwan.*") or dev:match("^tun.*") or dev:match("/") then
@ -932,16 +934,39 @@
</div>
</div>
</div>
<%
if sqm == "1" then
%>
<div class="cbi-value" data-index="16">
<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 %> />
<br />
<div class="cbi-value-description">
<%:SQM control bufferloat: the undesirable latency that arises when the router buffers too much data.%>
<%:You should disable SQM for LTE or any interfaces with variable speed.%>
</div>
</div>
</div>
<%
end
%>
<%
if qos == "1" then
%>
<div class="cbi-value" data-index="16">
<label class="cbi-value-title"><%:Enable QoS%></label>
<div class="cbi-value-field">
<input class="cbi-input-checkbox" type="checkbox" name="cbid.qos.<%=ifname%>.enabled" value="1" <% if uci:get("qos",ifname,"enabled") == "1" then %>checked<% end %> />
<br />
<div class="cbi-value-description">
<%:QoS permit to prioritize any upload traffic.%>
</div>
</div>
</div>
<%
end
%>
<div class="cbi-value" data-index="17">
<label class="cbi-value-title"><%:Download speed (Kb/s)%></label>
<div class="cbi-value-field">