{"record":{"id":"cea597d6426c307e","repo":"siyuan-note/siyuan","slug":"system-proxy-does-not-contain-a-supported-http-ht","errorCode":null,"errorMessage":"system proxy does not contain a supported HTTP, HTTPS or SOCKS proxy","messagePattern":"system proxy does not contain a supported HTTP, HTTPS or SOCKS proxy","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/util/system_proxy.go","lineNumber":91,"sourceCode":"\t}\n\tsocksAddress := proxies[\"socks5\"]\n\tif \"\" == socksAddress {\n\t\tsocksAddress = proxies[\"socks\"]\n\t}\n\tif \"\" != socksAddress {\n\t\tsocksProxy, parseErr := normalizeSystemNetworkProxyURL(socksAddress, \"socks5\")\n\t\tif parseErr != nil {\n\t\t\treturn nil, parseErr\n\t\t}\n\t\tif \"\" == ret.HTTPProxy {\n\t\t\tret.HTTPProxy = socksProxy\n\t\t}\n\t\tif \"\" == ret.HTTPSProxy {\n\t\t\tret.HTTPSProxy = socksProxy\n\t\t}\n\t}\n\tif \"\" == ret.HTTPProxy && \"\" == ret.HTTPSProxy {\n\t\treturn nil, fmt.Errorf(\"system proxy does not contain a supported HTTP, HTTPS or SOCKS proxy\")\n\t}\n\treturn ret, nil\n}\n\nfunc normalizeSystemNetworkProxyURL(address, defaultScheme string) (string, error) {\n\taddress = strings.TrimSpace(address)\n\tif !strings.Contains(address, \"://\") {\n\t\taddress = defaultScheme + \"://\" + address\n\t}\n\tproxyURL, err := url.Parse(address)\n\tif err != nil || \"\" == proxyURL.Host {\n\t\treturn \"\", fmt.Errorf(\"invalid system proxy address\")\n\t}\n\tswitch strings.ToLower(proxyURL.Scheme) {\n\tcase \"http\", \"https\", \"socks5\", \"socks5h\":\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"unsupported system proxy protocol [%s]\", proxyURL.Scheme)\n\t}","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/kernel/util/system_proxy.go#L73-L109","documentation":"parseSystemNetworkProxy parses the OS proxy settings (ProxyServer string, e.g. from Windows registry or system environment). After extracting http/https/socks entries, if no supported HTTP, HTTPS, or SOCKS proxy could be derived, it errors with this message. This happens when the proxy string contains only keys the parser does not map (e.g. ftp=...) or only empty values.","triggerScenarios":"System proxy configured as a semicolon-separated map containing no http=, https=, socks=, or socks5= entries with non-empty addresses — e.g. \"ftp=proxy.local:21\", \"=broken\", \";;;\", or a per-protocol map where all relevant values are blank. Note a bare address without '=' is handled earlier and won't hit this path.","commonSituations":"Windows proxy settings that only define an FTP proxy; PAC-based auto-config where the static ProxyServer string is empty or irrelevant; leftover registry values from uninstalled proxy software; environment-derived strings with unusual keys (e.g. wais=, gopher=).","solutions":["Set the system proxy to include an http= or https= entry with a valid host:port, or use the single-address form (proxy.example.com:8080)","If a SOCKS proxy is intended, use socks=host:port or socks5=host:port in the map","Clear stale/irrelevant proxy entries (ftp=, wais=, etc.) from system proxy settings so only supported protocols remain","If no proxy is actually needed, disable the system proxy entirely so the empty string path returns (nil, nil) instead of an error"],"exampleFix":"# before: only unsupported protocol mapped\nProxyServer = \"ftp=proxy.corp:21\"\n# after\nProxyServer = \"http=proxy.corp:8080;https=proxy.corp:8080\"","handlingStrategy":"fallback","validationCode":"function hasSupportedProxy(proxyServer) { if (!proxyServer || !proxyServer.includes(\"=\")) return Boolean(proxyServer); return proxyServer.split(\";\").some(f => /^(http|https|socks5?|socks)=.+/.test(f.trim().toLowerCase())); }","typeGuard":null,"tryCatchPattern":"try { proxy = loadSystemProxy(); } catch (e) { if (/does not contain a supported/.test(e.message)) { proxy = null; log.info(\"no usable system proxy, going direct\"); } else throw e; }","preventionTips":["Configure at least one http=, https=, or socks= entry with a non-empty address when using per-protocol proxy maps","Prefer the single-address form (host:port) which applies to both HTTP and HTTPS","Remove obsolete ftp=/gopher= style entries from system proxy settings","Disable the system proxy entirely when direct connection is intended"],"tags":["proxy","network","configuration","system"],"backgroundTag":"invalid-config-value","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"}