You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proxy port dropped when it matches the scheme default (regression since 8.21.0) #23681
curl should connect to the SOCKS proxy on port 80, as 8.20.0 and earlier do.
Since 8.21.0, Curl_peer_from_proxy_url() reads the proxy port with CURLU_NO_DEFAULT_PORT. That drops an explicit port whenever it matches the default port of the proxy URL's scheme. A proxy string without a scheme is guessed as http, so :80 is lost even when the proxy is SOCKS. curl then falls back to CURLOPT_PROXYPORT or a default:
--socks5 host:80, --socks4 host:80 and --preproxy host:80 connect to 1080
CURLOPT_PROXY"http://host:80" with CURLOPT_PROXYPORT 3128 connects to 3128
CURLOPT_PROXY"socks5://host:1080" with CURLOPT_PROXYPORT 9999 connects to 9999
The fallback changed too. It is now the scheme's default port, not the documented 1080, so -x host (no port) goes to port 80. CURLOPT_PROXY.md, CURLOPT_PROXYPORT.md and proxy.md still say 1080 (443 for HTTPS proxies).
This came in with bc40e09 (lib: introduce Curl_peer). The code is the same in 8.21.0, 8.22.0 and 8.23.0. I checked the behavior on current master; curl 8.18.0 does what the docs say.
curl/libcurl version
curl 8.23.1-DEV (master, a502385). Affects 8.21.0 and later.
Activity
icing commentedon Oct 30, 2026
Fixed in #23682
peer: use the given proxy port, fall back to the documented default