Skip to content

Proxychains 配置

ProxyChains is a tool that forces any TCP connection made by a given application to follow through a proxy like TOR or any other SOCKS4, SOCKS5 or HTTP(S) proxy.

Terminal window
sudo apt update
sudo apt install proxychains4
Terminal window
sudo yum install proxychains-ng
Terminal window
sudo pacman -S proxychains-ng
# or using yay
yay -S proxychains-ng
Terminal window
# Using Homebrew
brew install proxychains-ng

After installation, the config file is located at /usr/local/etc/proxychains.conf.

Proxychains is a Unix-only tool. On Windows, consider these alternatives:

  1. Proxifier (Commercial): A GUI application that forces any application to use a proxy.
  2. ProxyCap (Commercial): Similar to Proxifier with more granular control.
  3. WSL (Windows Subsystem for Linux): Install Proxychains inside WSL for command-line tools.

Edit the configuration file at /etc/proxychains.conf (or /etc/proxychains4.conf).

  1. Open the file:

    Terminal window
    sudo vim /etc/proxychains.conf
  2. Modify settings:

    • Scroll to the bottom to the [ProxyList] section.
    • Add your proxy server (e.g., SOCKS5 at 127.0.0.1:1080).
    [ProxyList]
    # add proxy here ...
    # meanwile
    # defaults set to "tor"
    # socks4 127.0.0.1 9050
    # Example:
    socks5 127.0.0.1 1080

Prepend proxychains (or proxychains4) to any command you want to run through the proxy.

Terminal window
# Example: Download a file using curl
proxychains curl https://www.google.com
# Example: Run a shell
proxychains bash