{"record":{"id":"53da47949896104a","repo":"siyuan-note/siyuan","slug":"automatic-proxy-detection-is-not-supported","errorCode":null,"errorMessage":"automatic proxy detection is not supported","messagePattern":"automatic proxy detection is not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kernel/util/system_proxy_windows.go","lineNumber":43,"sourceCode":")\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\n\t}\n\tif 0 == enabled {\n\t\treturn nil, nil\n\t}\n\n\tproxyServer, _, err := key.GetStringValue(\"ProxyServer\")\n\tif err != nil {","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/kernel/util/system_proxy_windows.go#L25-L61","documentation":"On Windows, SiYuan's system proxy reader supports only statically configured proxies. If the registry value AutoDetect is non-zero (Windows 'Automatically detect settings' / WPAD), readSystemNetworkProxy returns this error because auto-detected WPAD proxies cannot be resolved without PAC evaluation.","triggerScenarios":"readSystemNetworkProxy reads AutoDetect from HKCU\\...\\Internet Settings and gets a non-zero value while AutoConfigURL is absent — i.e. 'Automatically detect settings' is enabled in Windows proxy options and the system-proxy import is invoked.","commonSituations":"Windows default installations (AutoDetect is often on by default), machines using WPAD discovered via DHCP/DNS, or users who toggled detection on before enabling a manual proxy.","solutions":["Turn off 'Automatically detect settings' in Windows Settings - Network & Internet - Proxy","Set a manual proxy (ProxyEnable=1 with a ProxyServer value) and re-run the import","Clear the AutoDetect registry value under HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"],"exampleFix":"// before\n// AutoDetect = 1 (WPAD) -> error\n// after\n// AutoDetect = 0; ProxyEnable = 1; ProxyServer = \"127.0.0.1:7890\"","handlingStrategy":"validation","validationCode":"key, err := registry.OpenKey(registry.CURRENT_USER, `Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings`, registry.QUERY_VALUE)\nif err == nil {\n\tv, _, e := key.GetIntegerValue(\"AutoDetect\")\n\tif e == nil && v != 0 {\n\t\t// WPAD enabled: disable 'Automatically detect settings' first\n\t}\n\tkey.Close()\n}","typeGuard":null,"tryCatchPattern":"cfg, err := readSystemNetworkProxy()\nif err != nil && strings.Contains(err.Error(), \"automatic proxy detection\") {\n\t// fall back to manual proxy configuration in SiYuan\n\tcfg = nil\n}","preventionTips":["Turn off 'Automatically detect settings' in Windows proxy options before importing","Set an explicit manual proxy (ProxyEnable/ProxyServer) so WPAD is not relied upon","Check the AutoDetect registry value before invoking the import"],"tags":["proxy","windows","registry","wpad","unsupported"],"backgroundTag":"unsupported-operation","analyzedSha":"8641553a1f07374001902d3ce773285db1292b2d","analyzedAt":"2026-09-11T16:08:28.414Z","contentChangedAt":"2026-09-11T16:08:28.414Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}