windows: autoProxy keeps to its exclusions, and its listing to its scope

proxy.autoProxy.exclude is never probed or routed: learn and probe
requests for an excluded host are refused, and a site learned whole
(example.com) routes no excluded name under it (intranet.example.com):
the learned rule skips them.

Without the secrets scope, proxy-ctl proxy auto lists the sites routed
and counts: the hosts probed, those left to zapret and the sites behind
each strike are browsing history, as the logs are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Opus 5.5 committed 2026-10-27 16:36:00 +03:00
1 parent 5a89b8d11d
commit 694e176353
5 files changed
+82 -12

No files matched your search

+12 -1
View File
@@ -83,11 +83,22 @@ pub(super) fn apply(
let at = pin_at.min(rules.len());
rules.splice(at..at, pins);
// autoProxy.exclude is never routed by it: a site learned whole (example.com) must not take
// an excluded name under it (intranet.example.com) along.
let exclude: Vec<String> = input.cfg.proxy.auto_proxy.exclude.iter().map(|x| x.trim_start_matches('.').to_ascii_lowercase()).filter(|x| !x.is_empty()).collect();
for e in exits {
let (Some(tag), Some(path)) = (&e.rule_set, &e.path) else { continue };
rule_sets.push(json!({ "type": "local", "format": "source", "tag": tag, "path": path }));
if mode != RouteMode::AllBypass {
rules.push(json!({ "rule_set": [tag], "outbound": e.tag }));
rules.push(if exclude.is_empty() {
json!({ "rule_set": [tag], "outbound": e.tag })
} else {
json!({
"type": "logical", "mode": "and",
"rules": [{ "rule_set": [tag] }, { "domain_suffix": exclude, "invert": true }],
"outbound": e.tag,
})
});
}
dns_rules.push(json!({ "rule_set": [tag], "server": "remote" }));
}