LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

proxychains

Route TCP connections through proxy servers

TLDR

Run a command through the proxy
$ proxychains [command]
copy
Run curl through proxy
$ proxychains curl [url]
copy
Use a specific config file
$ proxychains -f [path/to/config.conf] [command]
copy
Quiet mode (suppress proxy info output)
$ proxychains -q [command]
copy
SSH through proxy
$ proxychains ssh [user]@[host]
copy
Chain proxychains with a browser
$ proxychains firefox
copy

SYNOPSIS

proxychains [-q] [-f configfile] program [args_]

DESCRIPTION

proxychains forces TCP connections made by a given application to go through proxy servers such as SOCKS4, SOCKS5, or HTTP proxies. It hooks network-related libc functions using LD_PRELOAD to redirect traffic transparently without modifying the target application.Useful for anonymization, routing traffic through Tor, and bypassing network restrictions. Supported authentication types are user/pass for SOCKS4/5 and basic for HTTP.The modern maintained version is proxychains-ng (proxychains4) by rofl0r, which is a continuation of the original project.

PARAMETERS

-q

Quiet mode. Do not display proxy connection information.
-f configfile_
Use specified configuration file instead of the default. Without this flag, proxychains searches in order: the path in the PROXYCHAINS_CONF_FILE environment variable, ./proxychains.conf, ~/.proxychains/proxychains.conf, and /etc/proxychains.conf.

CONFIGURATION

$ # /etc/proxychains.conf
strict_chain
proxy_dns

[ProxyList]
socks5 127.0.0.1 9050
http   192.168.1.1 8080
copy

CHAIN TYPES

$ strict_chain  - All proxies in order, fail if any is down
dynamic_chain - Skip dead proxies, at least one must respond
random_chain  - Random proxy order each connection
round_robin   - Cycle through proxies in order
copy

INSTALL

sudo dnf install proxychains-ng
copy
sudo pacman -S proxychains-ng
copy
sudo apk add proxychains-ng
copy
sudo zypper install proxychains-ng
copy
brew install proxychains-ng
copy
nix profile install nixpkgs#proxychains-ng
copy

CAVEATS

Only TCP connections are supported. UDP and ICMP traffic is not proxied. Statically linked programs bypass the LDPRELOAD hook. DNS requests can be proxied by enabling **proxydns** in the configuration file.

HISTORY

proxychains was originally written by haad and later forked as proxychains-ng (proxychains4) by rofl0r with improvements including better stability and additional features.

SEE ALSO

tor(1), torsocks(1), socat(1), ssh(1), curl(1)

Copied to clipboard
Kai