Skip to content

Commit dca4a6f

Browse files
laurazardmattn
authored andcommitted
Fixes static config map still being populated after system settings disabled.
Previously, if system proxy was enabled, darwinProxyConf.Static.Protocols got populated with the proxy configuration. If afterwards the system configuration was removed there was no place in the code where the map got reset, which led to incorrect configurations being returned even after calling ReloadConf() Signed-off-by: Laura Brehm <laurabrehm@hey.com>
1 parent 47d20da commit dca4a6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ieproxy_darwin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +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
61+
darwinProxyConf = ProxyConf{}
6262

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

0 commit comments

Comments
 (0)