wininet: skip set bypass list

This commit is contained in:
世界 2022-12-26 12:12:00 +08:00
parent fd5c69d7ab
commit d8c779c030
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -102,6 +102,9 @@ func SetSystemProxy(proxy string, bypass string) error {
var proxyOption internetPerConnOption
proxyOption.dwOption = internetPerConnProxyServer
*((*uintptr)(unsafe.Pointer(&proxyOption.value))) = uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(proxy)))
if bypass == "" {
return setOptions(flagsOption, proxyOption)
}
var bypassOption internetPerConnOption
bypassOption.dwOption = internetPerConnProxyBypass
*((*uintptr)(unsafe.Pointer(&bypassOption.value))) = uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(bypass)))