sudo apt install proxychains
/etc/proxychains.conf >> socks5 127.0.0.1 9050
proxychains terminal
Linux terminal SOCKS5 proxy support is typically achieved via command-line tools like proxychains4, ssh (using -D), or by setting environment variables ($ALL_PROXY) for tools like curl and wget. Proxychains4 is particularly effective for forcing non-proxy-aware applications to use a SOCKS5 proxy, and ssh -D 1080 user@host quickly creates a local tunnel. Methods to Use SOCKS5 in Linux Terminal:
Proxychains4 (Recommended): Install via sudo apt-get install proxychains4, then configure /etc/proxychains.conf to add socks5 127.0.0.1 1080 to the [ProxyList]. Run commands as proxychains4 <command> (e.g., proxychains4 wget google.com).
SSH Dynamic Port Forwarding: Create a SOCKS5 tunnel on port 1080 by running:
ssh -D 1080 -q -C -N username@remote_host.
Environment Variables: Set the proxy for the current session:
export ALL_PROXY=socks5://127.0.0.1:1080.
Application Specific: Use commands with native proxy support like curl --socks5-hostname localhost:1080 or git -c http.proxy=socks5://127.0.0.1:1080.
Redsocks: For system-wide redirection using iptables.
For lightweight tunneling, HevSocks5Tunnel (tun2socks) can also be used to route traffic.