Force an application's traffic through a SOCKS proxy

10,739

Wikipedia lists a number of open-source proxifiers. Of those, proxychains-ng seems to be the most actively developed, judging by GitHub activity.

To install and configure,

  1. Download the latest release
  2. Unzip and cd into the directory
  3. ./configure && make
  4. Optional: sudo make install && sudo make install-config
  5. nano /usr/local/etc/proxychains.conf
  6. At the end of the config file, set the SOCKS IP port address

Usage:

proxychains4 -q curl icanhazip.com
Share:
10,739

Related videos on Youtube

Dan Dascalescu
Author by

Dan Dascalescu

Updated on September 18, 2022

Comments

  • Dan Dascalescu
    Dan Dascalescu over 1 year

    How can the TCP traffic initiated by a specific application be forced to go through a SOCKS proxy, regardless of the remote IP or port?

    A VPN would direct all outbound traffic on a host through an interface (tun0 typically), so it's an overkill solution. But in a split tunnel configuration, instead of doing that by default, the VPN client offers a SOCKS proxy for specific applications. While browsers support connecting through a SOCKS proxy, many other applications don't.

    I've tried dante socksify but it didn't work with common programs like curl and wget. (I've sent a message to their mailing list, but it's not archived anywhere so I can't link to it.)

    • Ipor Sircer
      Ipor Sircer over 6 years
      use tsocks
  • intika
    intika about 6 years
    seems cool from that tool we could develop a gui to mimic proxifier on windows