windows: the app sets the system proxy; ps-core lint fixes
- The app points the signed-in user's system proxy (WinINet: browsers and most programs follow it) at the local proxy while it runs and proxy.systemProxy.enable asks; the user's own settings are kept and put back when the proxy stops, the service goes, the option is turned off or the app quits; one left behind by a killed app is cleared. A switch for it on the overview. Elsewhere than Windows it does nothing. - ps-core: clippy's collapsible ifs, comparisons without owned values, a range loop without indexing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
77becc235c
commit
7565e62571
9 files changed
+248
-17
No files matched your search
@@ -538,7 +538,7 @@ fn chain(b: &mut Builder, warnings: &mut Vec<String>) {
|
||||
if drop.is_empty() {
|
||||
for (t, hop) in &hops {
|
||||
let set = |ob: &mut Value| {
|
||||
if ob["tag"] == Value::from(t.as_str()) {
|
||||
if ob["tag"] == t.as_str() {
|
||||
if xray_tags.contains(t) || b.backend == Backend::Xray {
|
||||
ob["streamSettings"]["sockopt"]["dialerProxy"] = hop.clone().into();
|
||||
} else {
|
||||
@@ -554,7 +554,7 @@ fn chain(b: &mut Builder, warnings: &mut Vec<String>) {
|
||||
}
|
||||
for (t, why) in drop {
|
||||
warnings.push(format!("outbound '{t}': {why}; leaving it out"));
|
||||
let keep = |o: &Value| o["tag"] != Value::from(t.as_str());
|
||||
let keep = |o: &Value| o["tag"] != t.as_str();
|
||||
b.outbounds.retain(keep);
|
||||
b.endpoints.retain(keep);
|
||||
b.xray.retain(keep);
|
||||
|
||||
Reference in new issue
Block a user