mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-14 19:41:51 +00:00
Add option to disable Multipath check display
This commit is contained in:
parent
fafc6a9cbb
commit
aa0f3ef0f5
3 changed files with 15 additions and 1 deletions
|
@ -1491,6 +1491,10 @@ function settings_add()
|
||||||
local disableserverping = luci.http.formvalue("disableserverping") or "0"
|
local disableserverping = luci.http.formvalue("disableserverping") or "0"
|
||||||
ucic:set("openmptcprouter","settings","disableserverping",disableserverping)
|
ucic:set("openmptcprouter","settings","disableserverping",disableserverping)
|
||||||
|
|
||||||
|
-- Enable/disable multipath check
|
||||||
|
local disablemultipathtest = luci.http.formvalue("disablemultipathtest") or "0"
|
||||||
|
ucic:set("openmptcprouter","settings","disablemultipathtest",disablemultipathtest)
|
||||||
|
|
||||||
-- Enable/disable shadowsocks udp
|
-- Enable/disable shadowsocks udp
|
||||||
local shadowsocksudp = luci.http.formvalue("shadowsocksudp") or "0"
|
local shadowsocksudp = luci.http.formvalue("shadowsocksudp") or "0"
|
||||||
ucic:set("openmptcprouter","settings","shadowsocksudp",shadowsocksudp)
|
ucic:set("openmptcprouter","settings","shadowsocksudp",shadowsocksudp)
|
||||||
|
|
|
@ -384,6 +384,16 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="cbi-value">
|
||||||
|
<label class="cbi-value-title"><%:Disable multipath test%></label>
|
||||||
|
<div class="cbi-value-field">
|
||||||
|
<input type="checkbox" name="disablemultipathtest" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disablemultipathtest") == "1" then %>checked<% end %>>
|
||||||
|
<br />
|
||||||
|
<div class="cbi-value-description">
|
||||||
|
<%:Disable multipath test display in status page%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:Disable nDPI%></label>
|
<label class="cbi-value-title"><%:Disable nDPI%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
|
|
|
@ -1585,7 +1585,7 @@ function interfaces_status()
|
||||||
|
|
||||||
local multipath_available = ""
|
local multipath_available = ""
|
||||||
local multipath_available_state = ""
|
local multipath_available_state = ""
|
||||||
if connectivity ~= "ERROR" and mArray.openmptcprouter["dns"] == true and ifname ~= nil and ifname ~= "" and (gateway ~= "" or gateway6 ~= "") and (gw_ping == "UP" or gw_ping6 == "UP") then
|
if connectivity ~= "ERROR" and mArray.openmptcprouter["dns"] == true and ifname ~= nil and ifname ~= "" and (gateway ~= "" or gateway6 ~= "") and (gw_ping == "UP" or gw_ping6 == "UP") and uci:get("openmptcprouter", "settings", "disablemultipathtest") ~= "1" then
|
||||||
-- Test if multipath can work on the connection
|
-- Test if multipath can work on the connection
|
||||||
local multipath_available_state = uci:get("openmptcprouter",interface,"mptcp_status") or ""
|
local multipath_available_state = uci:get("openmptcprouter",interface,"mptcp_status") or ""
|
||||||
if multipath_available_state == "" then
|
if multipath_available_state == "" then
|
||||||
|
|
Loading…
Reference in a new issue