siyuan-note/siyuan · warning

automatic proxy configuration is not supported

Error message

automatic proxy configuration is not supported

What it means

On Windows, readSystemNetworkProxy reads proxy settings from the registry key 'Internet Settings'. If an AutoConfigURL (PAC file) is configured, it returns this error because PAC-based automatic proxy configuration is not implemented; only manual proxies are supported.

Solutions

  1. Disable 'Use automatic configuration script' in Windows proxy settings and configure a manual proxy instead
  2. Remove the AutoConfigURL registry value under Internet Settings
  3. Set ProxyEnable=1 with an explicit ProxyServer value and retry

Example fix

// before (registry)
AutoConfigURL="http://proxy.corp.local/wpad.dat"
// after
AutoConfigURL removed; ProxyEnable=1; ProxyServer="proxy.corp.local:8080"
Defensive patterns

Strategy: try-catch

Validate before calling

k, _ := registry.OpenKey(registry.CURRENT_USER, `Software\Microsoft\Windows\CurrentVersion\Internet Settings`, registry.QUERY_VALUE); v, _, err := k.GetStringValue("AutoConfigURL"); if err == nil && v != "" { /* PAC in use - not supported */ }

Try / catch

proxy, err := readSystemNetworkProxy(); if err != nil { if strings.Contains(err.Error(), "automatic proxy configuration") { /* fall back to direct or env-var proxy */ } }

Prevention

When it happens

Trigger: HKCU ...\Internet Settings contains a non-empty AutoConfigURL value (system proxy configured via PAC script, common in corporate networks).

Common situations: Corporate/enterprise machines using WPAD/PAC auto-config; VPN clients that install an AutoConfigURL; users who previously ran a proxy auto-config tool.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


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

Appendix: source

Thrown at kernel/util/system_proxy_windows.go:36

package util

import (
	"errors"

	"golang.org/x/sys/windows/registry"
)

func readSystemNetworkProxy() (*systemNetworkProxyConfig, error) {
	key, err := registry.OpenKey(registry.CURRENT_USER, `Software\Microsoft\Windows\CurrentVersion\Internet Settings`, registry.QUERY_VALUE)
	if err != nil {
		return nil, err
	}
	defer key.Close()

	autoConfigURL, _, err := key.GetStringValue("AutoConfigURL")
	if nil == err && "" != autoConfigURL {
		return nil, errors.New("automatic proxy configuration is not supported")
	}
	if nil != err && registry.ErrNotExist != err {
		return nil, err
	}
	autoDetect, _, err := key.GetIntegerValue("AutoDetect")
	if nil == err && 0 != autoDetect {
		return nil, errors.New("automatic proxy detection is not supported")
	}
	if nil != err && registry.ErrNotExist != err {
		return nil, err
	}

	enabled, _, err := key.GetIntegerValue("ProxyEnable")
	if registry.ErrNotExist == err {
		return nil, nil
	}
	if err != nil {
		return nil, err

View on GitHub (pinned to 9f775e8a12)