mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update ndpi-netfilter2 and add host to bypass only if not already here
This commit is contained in:
parent
1bcfffa392
commit
a3131ab8b0
2 changed files with 9 additions and 4 deletions
|
@ -14,13 +14,18 @@ _add_proto() {
|
|||
if [ "$(dd if=/proc/net/xt_ndpi/proto bs=4096 2> /dev/null | grep $protoname)" = "" ]; then
|
||||
echo "add_custom $protoname" >/proc/net/xt_ndpi/proto
|
||||
fi
|
||||
allurls="$(dd if=/proc/net/xt_ndpi/host_proto bs=4096 2> /dev/null)"
|
||||
hosts="$( uci -q get omr-bypass.$protoname.url )"
|
||||
for url in $hosts; do
|
||||
echo "$protoname:$url" >/proc/net/xt_ndpi/host_proto
|
||||
if [ "$(echo "$allurls" | grep -i ^${protoname}: | grep $url)" = "" ]; then
|
||||
echo "$protoname:$url" >/proc/net/xt_ndpi/host_proto
|
||||
fi
|
||||
done
|
||||
ip="$( uci -q get omr-bypass.$protoname.ip )"
|
||||
for ip in $ips; do
|
||||
echo "$protoname:$ip" >/proc/net/xt_ndpi/ip_proto
|
||||
if [ "$(echo "$allurls" | grep -i ^${protoname}: | grep $ip)" = "" ]; then
|
||||
echo "$protoname:$ip" >/proc/net/xt_ndpi/ip_proto
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue