From b4cb3ce3bed41360964c1a19641c0d75e2f5f3ab Mon Sep 17 00:00:00 2001 From: gitea-action Date: Sat, 15 Mar 2025 16:00:28 +0800 Subject: [PATCH] nikki: sync upstream last commit: https://github.com/nikkinikki-org/OpenWrt-nikki/commit/defe274e99284cb3361b0b48fc4621243ae1b6b1 --- nikki/files/ucode/hijack.ut | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nikki/files/ucode/hijack.ut b/nikki/files/ucode/hijack.ut index 0112b4808..9f0abfb0d 100644 --- a/nikki/files/ucode/hijack.ut +++ b/nikki/files/ucode/hijack.ut @@ -5,10 +5,11 @@ import { cursor } from 'uci'; import { connect } from 'ubus'; - import { uci_bool, uci_array, get_users, get_groups } from '/etc/nikki/ucode/include.uc'; + import { uci_bool, uci_array, get_users, get_groups, get_cgroups } from '/etc/nikki/ucode/include.uc'; const users = get_users(); const groups = get_groups(); + const cgroups = get_cgroups(); const uci = cursor(); const ubus = connect(); @@ -42,7 +43,7 @@ const bypass_user = filter(uci_array(uci.get('nikki', 'proxy', 'bypass_user')), (x) => x != 'root' && index(users, x) >= 0); const bypass_group = filter(uci_array(uci.get('nikki', 'proxy', 'bypass_group')), (x) => x != 'root' && index(groups, x) >= 0); - const bypass_cgroup = uci_array(uci.get('nikki', 'proxy', 'bypass_cgroup')); + const bypass_cgroup = filter(uci_array(uci.get('nikki', 'proxy', 'bypass_cgroup')), (x) => x != 'nikki' && index(cgroups, x) >= 0); const bypass_dscp = uci_array(uci.get('nikki', 'proxy', 'bypass_dscp')); const bypass_china_mainland_ip = uci_bool(uci.get('nikki', 'proxy', 'bypass_china_mainland_ip')); const proxy_tcp_dport = split((uci.get('nikki', 'proxy', 'proxy_tcp_dport') ?? '0-65535'), ' ');