shadow1ng/fscan · error

Only support socks5

Error message

Only support socks5

What it means

Guard in Socks5Dailer: the configured SOCKS proxy URL (Socks5Proxy) was parsed successfully but its scheme is something other than "socks5" (e.g. http, socks4). Only socks5 proxies are supported, so the dialer refuses to build a proxy.Dialer for any other scheme.

Source

Thrown at libs/grdp/login/screen.go:104

	timeout := forward.Timeout
	if err := conn.SetWriteDeadline(time.Now().Add(timeout * 6)); err != nil {
		return nil, err
	}
	if err := conn.SetReadDeadline(time.Now().Add(timeout * 6)); err != nil {
		return nil, err
	}

	return conn, nil
}

func Socks5Dailer(forward *net.Dialer) (proxy.Dialer, error) {
	u, err := url.Parse(Socks5Proxy)
	if err != nil {
		return nil, err
	}
	if strings.ToLower(u.Scheme) != "socks5" {
		return nil, errors.New("Only support socks5")
	}
	address := u.Host
	var auth proxy.Auth
	var dailer proxy.Dialer
	if u.User.String() != "" {
		auth = proxy.Auth{}
		auth.User = u.User.Username()
		password, _ := u.User.Password()
		auth.Password = password
		dailer, err = proxy.SOCKS5("tcp", address, &auth, forward)
	} else {
		dailer, err = proxy.SOCKS5("tcp", address, nil, forward)
	}

	if err != nil {
		return nil, err
	}
	return dailer, nil

View on GitHub (pinned to 95cc12e753)

Solutions

  1. Set the proxy URL with a socks5:// scheme, e.g. socks5://127.0.0.1:1080
  2. Verify the proxy server actually speaks SOCKS5, not HTTP/SOCKS4
  3. Drop the proxy setting to connect directly if no SOCKS5 proxy is available
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at libs/grdp/login/screen.go:104 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06). Data as JSON: /api/errors/41fa46a3846f96b1. Report an issue: GitHub.