{"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":"validation","errorClass":null,"httpStatus":null,"severity":"warning","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/9f775e8a12daef8255556097396f9b2739078892/kernel/util/system_proxy.go#L73-L109","documentation":"parseSystemNetworkProxy parses the OS-level proxy configuration into HTTP/HTTPS proxy URLs. If, after evaluating the system's proxy settings (including SOCKS fallback for HTTPS), no usable HTTP or HTTPS proxy string was found, it rejects the whole configuration as containing no supported proxy.","triggerScenarios":"Windows registry (or equivalent OS settings) has ProxyEnable on but empty ProxyServer, or only non-HTTP/SOCKS entries, or a manual config whose parsed HTTPProxy and HTTPSProxy both end up empty.","commonSituations":"User disabled all proxies but left the OS 'use a proxy server' toggle in an odd state; enterprise environment uses PAC/AutoConfig which is unsupported; ProxyServer value malformed so nothing parses.","solutions":["Set a valid manual proxy in OS settings (e.g. http=host:port or host:port)","Use a SOCKS5 proxy entry so HTTPSProxy can fall back to it","Disable PAC/AutoConfigURL and use manual proxy configuration","If no proxy is intended, disable the proxy setting entirely rather than leaving an empty manual entry"],"exampleFix":"// before (Windows Internet Settings)\nProxyEnable=1, ProxyServer=\"\"            // -> error\n// after\nProxyEnable=1, ProxyServer=\"http=127.0.0.1:8080;https=127.0.0.1:8080\"","handlingStrategy":"fallback","validationCode":"if httpProxy == \"\" && httpsProxy == \"\" && socksProxy == \"\" { /* configure a manual proxy or proceed direct */ }","typeGuard":null,"tryCatchPattern":"ret, err := parseSystemNetworkProxy(); if err != nil { /* fall back to direct connection or http.ProxyFromEnvironment */ }","preventionTips":["Configure an explicit manual proxy in OS settings","Avoid empty ProxyServer values with ProxyEnable=1","Prefer PAC-free environments or document PAC as unsupported"],"tags":["proxy","system-config","network"],"backgroundTag":"invalid-config-value","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"}