fix: multiple fixes

This commit is contained in:
FUFSoB committed 2026-09-17 18:15:55 +05:00
1 parent ffc7816289
commit 97332c1774
23 files changed
+940 -96

No files matched your search

@@ -205,12 +205,14 @@ let
[ -s "$AUTOPROXY_DIR/state.json" ] || echo '{"domains":{},"hosts":{},"exits":{},"backlog":{}}' > "$AUTOPROXY_DIR/state.json"
# direct is always exit 0; state is keyed by tag, so shifting indices are
# harmless.
# harmless. Disabled outbounds are no exit: the prober drops what was learned
# through them.
PROBE_EXITS_JSON=$(${jq} -c \
--argjson max ${toString proxyCfg.autoProxy.maxExits} \
--argjson base ${toString proxyCfg.autoProxy.probeBasePort} \
--argjson disabled "''${DISABLED_TAGS_JSON:-[]}" \
--arg dir "$AUTOPROXY_DIR" '
(["direct"] + map(select(. != "direct")))[0:$max]
(["direct"] + map(select(. != "direct" and (. as $t | $disabled | index([$t]) | not))))[0:$max]
| to_entries
| map({i: .key, tag: .value, port: ($base + .key),
rule_set: ("autoproxy-" + (.key | tostring)),