{"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":"exception","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/8641553a1f07374001902d3ce773285db1292b2d/kernel/util/system_proxy_windows.go#L18-L54","documentation":"On Windows, SiYuan reads the registry key HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings to import the system proxy. If the AutoConfigURL value is set (a PAC/WPAD auto-configuration proxy), the reader refuses it and returns this error, because PAC scripts cannot be evaluated by the simple static proxy importer.","triggerScenarios":"readSystemNetworkProxy finds a non-empty AutoConfigURL string in the registry — i.e. Windows Internet Options is set to 'Use automatic configuration script' or a corporate PAC/GPO/Proxy Auto-Config is active — and the caller invokes the system-proxy import path on Windows.","commonSituations":"Corporate laptops with PAC scripts pushed by IT policy, or users who configured WPAD/autoconfig in Windows Internet Options; importing the proxy then fails with this message.","solutions":["Disable the automatic configuration script in Windows Settings (Network & Internet - Proxy - turn off 'Use setup script') and configure a manual proxy instead","Ask IT for the PAC's static proxy host:port and set it as a manual ProxyServer value","Skip the system-proxy import in SiYuan and configure the proxy inside SiYuan manually"],"exampleFix":"// registry state before\n// AutoConfigURL = \"http://wpad.corp/wpad.dat\"  -> error\n// after (disable PAC, set manual proxy)\n// ProxyEnable = 1, ProxyServer = \"proxy.corp:8080\"","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.GetStringValue(\"AutoConfigURL\")\n\tif e == nil && v != \"\" {\n\t\t// PAC active: skip import or prompt user to disable it first\n\t}\n\tkey.Close()\n}","typeGuard":null,"tryCatchPattern":"cfg, err := readSystemNetworkProxy()\nif err != nil && strings.Contains(err.Error(), \"automatic proxy configuration\") {\n\t// fall back to manual proxy configuration in SiYuan\n\tcfg = nil\n}","preventionTips":["Disable 'Use setup script' (PAC/WPAD) in Windows proxy settings before importing the system proxy","Obtain a static proxy address from IT when a PAC is mandatory","Check the AutoConfigURL registry value before invoking the import"],"tags":["proxy","windows","registry","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-14T00:17:10.932Z"}