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

Remove duplicate in protocol list of omr-bypass

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-08-03 19:10:12 +02:00
parent edf0362615
commit c22707f48a
2 changed files with 3 additions and 3 deletions

View file

@ -183,9 +183,9 @@ return L.view.extend({
for (var i = 0; i < host.length; i++) {
var m = host[i].split(/:/);
if (m && m[0] != "#Proto")
name.push(m[0]);
name.push(m[0].toLowerCase());
}
name = Array.from(new Set(name)).sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); });
name = Array.from(new Set(name)).sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase())}).reduce(function(a, b){ if (a.slice(-1)[0] !== b) a.push(b);return a;},[]);
for (var i = 0; i < name.length; i++) {
this.value(name[i]);
}

View file

@ -277,7 +277,7 @@ _bypass_proto() {
fi
# Use dnsmasq ipset to bypass domains of the proto
local domains
domains="$(cat /proc/net/xt_ndpi/host_proto | grep $proto: | sed -e "s/$proto://" -e 's/*//' -e 's/,/ /g')"
domains="$(cat /proc/net/xt_ndpi/host_proto | grep -i $proto: | sed -e "s/$proto://" -e 's/*//' -e 's/,/ /g')"
if [ -n "$domains" ]; then
for domain in $domains; do
if [ -n "$domain" ] && [ "$(uci -q show omr-bypass | grep $domain)" = "" ]; then