mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add option to enable/disable nDPI
This commit is contained in:
parent
d5fd515873
commit
7840a05a8a
3 changed files with 35 additions and 19 deletions
|
@ -341,6 +341,7 @@ _bypass_proto() {
|
|||
|
||||
[ -z "$intf" ] && intf="all"
|
||||
[ -z "$proto" ] && return
|
||||
if [ "$(uci -q get openmptcprouter.settings.ndpi)" != "0" ]; then
|
||||
if [ "$intf" = "all" ]; then
|
||||
iptables-restore -w --wait=60 --noflush <<-EOF
|
||||
*mangle
|
||||
|
@ -368,6 +369,7 @@ _bypass_proto() {
|
|||
EOF
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# Use dnsmasq ipset to bypass domains of the proto
|
||||
local domains
|
||||
domains="$(cat /proc/net/xt_ndpi/host_proto | grep -i $proto: | sed -e "s/$proto://i" -e 's/*//' -e 's/,/ /g')"
|
||||
|
|
|
@ -1041,6 +1041,10 @@ function settings_add()
|
|||
local shadowsocksudp = luci.http.formvalue("shadowsocksudp") or "0"
|
||||
ucic:set("openmptcprouter","settings","shadowsocksudp",shadowsocksudp)
|
||||
|
||||
-- Enable/disable nDPI
|
||||
local ndpi = luci.http.formvalue("ndpi") or "1"
|
||||
ucic:set("openmptcprouter","settings","ndpi",ndpi)
|
||||
|
||||
-- Enable/disable fast open
|
||||
local disablefastopen = luci.http.formvalue("disablefastopen") or "0"
|
||||
if disablefastopen == "0" then
|
||||
|
|
|
@ -331,6 +331,16 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Disable nDPI%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" name="ndpi" class="cbi-input-checkbox" value="0" <% if luci.model.uci.cursor():get("openmptcprouter","settings","ndpi") == "0" then %>checked<% end %>>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Disable nDPI, used for protocols in OMR-ByPass%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Disable ModemManager%></label>
|
||||
<div class="cbi-value-field">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue