siyuan-note/siyuan · error
system proxy does not contain a supported HTTP, HTTPS or SOC
Error message
system proxy does not contain a supported HTTP, HTTPS or SOCKS proxy
What it means
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.
Source
Thrown at kernel/util/system_proxy.go:91
}
socksAddress := proxies["socks5"]
if "" == socksAddress {
socksAddress = proxies["socks"]
}
if "" != socksAddress {
socksProxy, parseErr := normalizeSystemNetworkProxyURL(socksAddress, "socks5")
if parseErr != nil {
return nil, parseErr
}
if "" == ret.HTTPProxy {
ret.HTTPProxy = socksProxy
}
if "" == ret.HTTPSProxy {
ret.HTTPSProxy = socksProxy
}
}
if "" == ret.HTTPProxy && "" == ret.HTTPSProxy {
return nil, fmt.Errorf("system proxy does not contain a supported HTTP, HTTPS or SOCKS proxy")
}
return ret, nil
}
func normalizeSystemNetworkProxyURL(address, defaultScheme string) (string, error) {
address = strings.TrimSpace(address)
if !strings.Contains(address, "://") {
address = defaultScheme + "://" + address
}
proxyURL, err := url.Parse(address)
if err != nil || "" == proxyURL.Host {
return "", fmt.Errorf("invalid system proxy address")
}
switch strings.ToLower(proxyURL.Scheme) {
case "http", "https", "socks5", "socks5h":
default:
return "", fmt.Errorf("unsupported system proxy protocol [%s]", proxyURL.Scheme)
}View on GitHub (pinned to 8641553a1f)
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
Example fix
# before: only unsupported protocol mapped ProxyServer = "ftp=proxy.corp:21" # after ProxyServer = "http=proxy.corp:8080;https=proxy.corp:8080"
Defensive patterns
Strategy: fallback
Validate before calling
function hasSupportedProxy(proxyServer) { if (!proxyServer || !proxyServer.includes("=")) return Boolean(proxyServer); return proxyServer.split(";").some(f => /^(http|https|socks5?|socks)=.+/.test(f.trim().toLowerCase())); } Try / catch
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; } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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=).
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- proxy returned unexpected tunnel data
- SOCKS5 proxy does not support context dialing
- proxy CONNECT returned %s
- agent HTTP tools support HTTP, HTTPS and SOCKS5 proxies
- invalid system proxy address
AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11).
Data as JSON: /api/errors/cea597d6426c307e.
Report an issue: GitHub.