Skip to content

Commit 47d20da

Browse files
laurazardmattn
authored andcommitted
Always reset active flag on macOS.
Previously, if the system configuration had proxies enabled, darwinProxyConf would get set to true. After that, even if ReloadConf() got called, there was nowhere in the code where that flag got reset, so it would stay active forever, which is incorrect behaviour. Signed-off-by: Laura Brehm <laurabrehm@hey.com>
1 parent 09b2bb5 commit 47d20da

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ieproxy_darwin.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func cfArrayGetGoStrings(cfArray C.CFArrayRef) []string {
5858
func writeConf() {
5959
cfDictProxy := C.CFDictionaryRef(C.CFNetworkCopySystemProxySettings())
6060
defer C.CFRelease(C.CFTypeRef(cfDictProxy))
61+
darwinProxyConf.Static.Active = false
6162

6263
cfNumHttpEnable := C.CFNumberRef(C.CFDictionaryGetValue(cfDictProxy, unsafe.Pointer(C.kCFNetworkProxiesHTTPEnable)))
6364
if unsafe.Pointer(cfNumHttpEnable) != C.NULL && cfNumberGetGoInt(cfNumHttpEnable) > 0 {

0 commit comments

Comments
 (0)