Proxychains
proxychains-ng forces TCP applications to route through a proxy without changing each application's native proxy settings.
In this project, it is useful when a CLI tool (for example curl, git, ssh, or package managers) needs to reach internal resources through the same local SOCKS5 endpoint used by FoxyProxy.
Setup
Proxychains reads from a config file and wraps commands using proxychains4 <command>.
- Install proxychains.
## Fedora
sudo dnf install proxychains-ng -y
## Ubuntu / Debian
sudo apt update && sudo apt install proxychains4 -y
- Update
/etc/proxychains.confand change3456to your SOCKS proxy port, which is usually configured asDynamicForwardin~/.ssh/config.
sudoedit /etc/proxychains.conf
strict_chain
proxy_dns
[ProxyList]
socks5 127.0.0.1 3456
- Start your SSH SOCKS tunnel first (matching this docs set):
ssh -N example-network
- Run commands through the tunnel.
proxychains curl -I https://example.com
proxychains nc -vz -w 3 example.com 443
Notes
- Use
proxy_dnsto avoid local DNS leaks when resolving internal hostnames. - Proxychains is best for TCP-based CLI traffic; browser traffic is usually easier with FoxyProxy.
- If the command hangs, verify the SSH tunnel is running and listening on
127.0.0.1:3456.