When traffic must leave through a SOCKS tunnel instead of a direct route or an HTTP proxy, wget still works well as long as the proxying happens outside wget itself. This is useful for jump-host access, Tor-style egress, and controlled alternate network paths where the download job should stay otherwise unchanged.
wget does not provide native SOCKS options like it does for HTTP, HTTPS, and FTP proxies. A wrapper such as proxychains4 or proxychains-ng intercepts the TCP connections of the launched program and forwards them through a SOCKS4a or SOCKS5 endpoint, which keeps the wget command shape familiar while moving transport control into the wrapper configuration.
The wrapper and the proxy have to agree on address, protocol version, and DNS behavior before the result is trustworthy. Use proxy_dns when hostnames should resolve through the SOCKS path, test with one small request first, and remember that some unusual programs may not cooperate with library-preload wrappers.
$ ssh -N -D 9050 user@jump.example.net
Bind the tunnel to 127.0.0.1 unless another host truly needs to share the proxy port.
$ mkdir -p ~/.proxychains
~/.proxychains/wget-socks.conf dynamic_chain proxy_dns [ProxyList] socks5 127.0.0.1 9050
Use socks4, socks4a, or socks5 only when it matches the real endpoint, and keep proxy_dns enabled when hostname lookups must follow the SOCKS path.
$ proxychains4 -f ~/.proxychains/wget-socks.conf wget -S --spider http://example.com/ [proxychains] config file found: /home/user/.proxychains/wget-socks.conf [proxychains] DLL init: proxychains-ng 4.17 Connecting to example.com (example.com)|224.0.0.1|:80... [proxychains] Dynamic chain ... 127.0.0.1:9050 ... example.com:80 ... OK connected. HTTP request sent, awaiting response... HTTP/1.1 200 OK
The proxychains status line is the decisive signal that wget's TCP session went through the SOCKS endpoint instead of leaving directly.
$ wget -S --spider http://example.com/ Connecting to example.com (example.com)|93.184.216.34|:80... connected.
The direct path does not show the proxychains chain line, so keep the proxied and direct checks separate when you are validating a controlled route.
$ proxychains4 -f ~/.proxychains/wget-socks.conf wget --output-document=report.html http://example.com/report.html
wget does not read SOCKS settings from http_proxy or ~/.wgetrc, so dropping the wrapper usually sends traffic back to the normal network path.
$ proxychains4 -f ~/.proxychains/wget-socks.conf wget --tries=1 --timeout=10 --spider http://example.com/
Short timeout and spider checks are the safest recurring health probe for a SOCKS-wrapped wget job. Related: How to set connection and read timeouts in wget