Skip to content

Commit ab21933

Browse files
committed
macos fix
1 parent 24252d0 commit ab21933

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

src/macos.rs

+23-21
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,28 @@ impl SystemProxy {
6565
pub fn unset() {
6666
let services = get_services();
6767

68-
let _ = networksetup()
69-
.args([
70-
format!("-setwebproxystate", string_protocol),
71-
service,
72-
"off".to_string(),
73-
])
74-
.output();
75-
let _ = networksetup()
76-
.args([
77-
format!("-setsecurewebproxystate", string_protocol),
78-
service,
79-
"off".to_string(),
80-
])
81-
.output();
82-
let _ = networksetup()
83-
.args([
84-
format!("-setsocksfirewallproxystate", string_protocol),
85-
service,
86-
"off".to_string(),
87-
])
88-
.output();
68+
for service in &services {
69+
let _ = networksetup()
70+
.args([
71+
format!("-setwebproxystate"),
72+
service.clone(),
73+
"off".to_string(),
74+
])
75+
.output();
76+
let _ = networksetup()
77+
.args([
78+
format!("-setsecurewebproxystate"),
79+
service.clone(),
80+
"off".to_string(),
81+
])
82+
.output();
83+
let _ = networksetup()
84+
.args([
85+
format!("-setsocksfirewallproxystate"),
86+
service.clone(),
87+
"off".to_string(),
88+
])
89+
.output();
90+
}
8991
}
9092
}

0 commit comments

Comments
 (0)