6

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.)

1
  • use tsocks Commented Dec 18, 2017 at 9:58

2 Answers 2

8

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
1
  • seems cool from that tool we could develop a gui to mimic proxifier on windows Commented Apr 26, 2018 at 20:30
2

Alternative solution:

Proxybound can do the job

proxybound application-command

Note: I am the developer of this program.

1
  • Are you still maintaining this ? Commented Oct 27, 2023 at 1:44

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.