mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 16:44:23 +08:00
🛸 Sync 2026-03-30 20:31:46
This commit is contained in:
1 parent
47de432ff4
commit
9283298b33
78 files changed
+2983
-2274
No files matched your search
@@ -179,8 +179,12 @@ start_service() {
|
||||
ucode -S "$MIXIN_UC" | yq -M -p json -o yaml | yq -M -i eval-all '... comments="" | . as $item ireduce ({}; . * $item ) | .proxies = .nikki-proxies + .proxies | del(.nikki-proxies) | .proxy-groups = .nikki-proxy-groups + .proxy-groups | del(.nikki-proxy-groups) | .rules = .nikki-rules + .rules | del(.nikki-rules)' "$RUN_PROFILE_PATH" "$MIXIN_FILE_PATH" -
|
||||
fi
|
||||
if [ "$proxy_enabled" = 1 ]; then
|
||||
yq -M -i '(.tun) |= (.auto-route = false | .auto-redirect = false | .auto-detect-interface = false)' "$RUN_PROFILE_PATH"
|
||||
yq -M -i '(.listeners[] | select(.type == "tun")) |= (.auto-route = false | .auto-redirect = false | .auto-detect-interface = false)' "$RUN_PROFILE_PATH"
|
||||
if yq -M -e 'has("tun")' "$RUN_PROFILE_PATH" > /dev/null 2>&1; then
|
||||
yq -M -i '(.tun) |= (.auto-route = false | .auto-redirect = false | .auto-detect-interface = false | .disable-icmp-forwarding = true)' "$RUN_PROFILE_PATH"
|
||||
fi
|
||||
if yq -M -e 'has("listeners")' "$RUN_PROFILE_PATH" > /dev/null 2>&1; then
|
||||
yq -M -i '(.listeners[] | select(.type == "tun")) |= (.auto-route = false | .auto-redirect = false | .auto-detect-interface = false | .disable-icmp-forwarding = true)' "$RUN_PROFILE_PATH"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# check profile
|
||||
|
||||
@@ -10,8 +10,6 @@ mixin_rule_provider=$(uci -q get nikki.mixin.rule_provider); [ -z "$mixin_rule_p
|
||||
|
||||
# since v1.19.0
|
||||
|
||||
mixin_ui_path=$(uci -q get nikki.mixin.ui_path); [ -z "$mixin_ui_path" ] && uci set nikki.mixin.ui_path=ui
|
||||
|
||||
uci show nikki | grep -E 'nikki\.@rule\[[[:digit:]]+\].match=' | sed 's/nikki.@rule\[\([[:digit:]]\+\)\].match=.*/rename nikki.@rule[\1].match=matcher/' | uci batch
|
||||
|
||||
# since v1.19.1
|
||||
|
||||
Reference in new issue
Block a user