{"record":{"id":"9523d1930f2febea","repo":"siyuan-note/siyuan","slug":"automatic-proxy-configuration-is-not-supported","errorCode":null,"errorMessage":"automatic proxy configuration is not supported","messagePattern":"automatic proxy configuration is not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kernel/util/system_proxy_windows.go","lineNumber":36,"sourceCode":"\npackage util\n\nimport (\n\t\"errors\"\n\n\t\"golang.org/x/sys/windows/registry\"\n)\n\nfunc readSystemNetworkProxy() (*systemNetworkProxyConfig, error) {\n\tkey, err := registry.OpenKey(registry.CURRENT_USER, `Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings`, registry.QUERY_VALUE)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer key.Close()\n\n\tautoConfigURL, _, err := key.GetStringValue(\"AutoConfigURL\")\n\tif nil == err && \"\" != autoConfigURL {\n\t\treturn nil, errors.New(\"automatic proxy configuration is not supported\")\n\t}\n\tif nil != err && registry.ErrNotExist != err {\n\t\treturn nil, err\n\t}\n\tautoDetect, _, err := key.GetIntegerValue(\"AutoDetect\")\n\tif nil == err && 0 != autoDetect {\n\t\treturn nil, errors.New(\"automatic proxy detection is not supported\")\n\t}\n\tif nil != err && registry.ErrNotExist != err {\n\t\treturn nil, err\n\t}\n\n\tenabled, _, err := key.GetIntegerValue(\"ProxyEnable\")\n\tif registry.ErrNotExist == err {\n\t\treturn nil, nil\n\t}\n\tif err != nil {\n\t\treturn nil, err","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/util/system_proxy_windows.go#L18-L54","documentation":"On Windows, readSystemNetworkProxy reads proxy settings from the registry key 'Internet Settings'. If an AutoConfigURL (PAC file) is configured, it returns this error because PAC-based automatic proxy configuration is not implemented; only manual proxies are supported.","triggerScenarios":"HKCU ...\\Internet Settings contains a non-empty AutoConfigURL value (system proxy configured via PAC script, common in corporate networks).","commonSituations":"Corporate/enterprise machines using WPAD/PAC auto-config; VPN clients that install an AutoConfigURL; users who previously ran a proxy auto-config tool.","solutions":["Disable 'Use automatic configuration script' in Windows proxy settings and configure a manual proxy instead","Remove the AutoConfigURL registry value under Internet Settings","Set ProxyEnable=1 with an explicit ProxyServer value and retry"],"exampleFix":"// before (registry)\nAutoConfigURL=\"http://proxy.corp.local/wpad.dat\"\n// after\nAutoConfigURL removed; ProxyEnable=1; ProxyServer=\"proxy.corp.local:8080\"","handlingStrategy":"try-catch","validationCode":"k, _ := registry.OpenKey(registry.CURRENT_USER, `Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings`, registry.QUERY_VALUE); v, _, err := k.GetStringValue(\"AutoConfigURL\"); if err == nil && v != \"\" { /* PAC in use - not supported */ }","typeGuard":null,"tryCatchPattern":"proxy, err := readSystemNetworkProxy(); if err != nil { if strings.Contains(err.Error(), \"automatic proxy configuration\") { /* fall back to direct or env-var proxy */ } }","preventionTips":["Disable PAC/AutoConfigURL on machines using this library","Prefer manual proxy configuration","Check registry for AutoConfigURL before relying on system proxy discovery"],"tags":["proxy","windows","unsupported-feature"],"backgroundTag":"unsupported-platform","analyzedSha":"9f775e8a12daef8255556097396f9b2739078892","analyzedAt":"2026-09-19T03:17:15.984Z","contentChangedAt":"2026-09-19T03:17:15.984Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}