siyuan-note/siyuan · warning

system proxy does not contain a supported HTTP, HTTPS or…

Error message

system proxy does not contain a supported HTTP, HTTPS or SOCKS proxy

What it means

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.

Solutions

  1. Set a valid manual proxy in OS settings (e.g. http=host:port or host:port)
  2. Use a SOCKS5 proxy entry so HTTPSProxy can fall back to it
  3. Disable PAC/AutoConfigURL and use manual proxy configuration
  4. If no proxy is intended, disable the proxy setting entirely rather than leaving an empty manual entry

Example fix

// before (Windows Internet Settings)
ProxyEnable=1, ProxyServer=""            // -> error
// after
ProxyEnable=1, ProxyServer="http=127.0.0.1:8080;https=127.0.0.1:8080"
Defensive patterns

Strategy: fallback

Validate before calling

if httpProxy == "" && httpsProxy == "" && socksProxy == "" { /* configure a manual proxy or proceed direct */ }

Try / catch

ret, err := parseSystemNetworkProxy(); if err != nil { /* fall back to direct connection or http.ProxyFromEnvironment */ }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

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


AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19). Data as JSON: /api/errors/cea597d6426c307e. Report an issue: GitHub.

Appendix: 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 9f775e8a12)