How to route traffic through a specific SOCKS proxy on a per-app basis?

10

6

I'm running a certain desktop app (actually via AIR if it makes any difference) which doesn't have any built-in proxy configuration settings.

I need to get all traffic just from this app directed through a secure SOCKS proxy. This implies I can't use the global network preferences, as these would affect many other apps.

Is there any way to force all network communication through a given SOCKS proxy on a per-app basis?

It would also be helpful to know if there's a way to perform such routing globally, based on specific IP addresses (as this could allow for some reasonable workaround).

GJ.

Posted 2012-04-08T22:52:38.983

Reputation: 8 151

Answers

4

ProxyCap enables you to redirect your computer's network connections through proxy servers. You can tell ProxyCap which applications will connect to the Internet through a proxy and under what circumstances. This is done through a user friendly interface, without the need to reconfigure any of your Internet clients.

Key features:

  • Support for SOCKS4, SOCKS5 and HTTPS proxy servers
  • Direct support for SSH tunneling (specify a SSH server as the proxy server)
  • Support for TCP- and UDP-based network protocols
  • Proxy-side DNS support
  • Flexible routing rules
  • Support for proxy chains
  • IPv6 support
  • Support for 64-bit applications
  • Centralized management support

GJ.

Posted 2012-04-08T22:52:38.983

Reputation: 8 151

1ProxyCap is available for OS X as well – GJ. – 2012-04-15T20:41:32.120

1

In the article Watch hulu.com outside the US on Mac OS X, the author tried tsocks/dsocks/dante from macports, but none of them worked well. As this article was written in 2009, it is quite possible that these applications have since improved and may now work for you.

What the author finally found was Proxifier for Mac OS X, a native cocoa application which lets you tunnel a whole application through various kinds of proxies.

Its Proxification Rules menu has a "Process Only the Following" option, where one can add a rule for the applications you want to tunnel through the proxy (by default it'll try to socksify everything).

harrymc

Posted 2012-04-08T22:52:38.983

Reputation: 306 093

0

MacPorts has a tsocks port for using a SOCKS proxy with applications that aren't normally proxy-aware, or that can't do SOCKS. If you can launch your application from the terminal, then it may serve your needs.

CodeGnome

Posted 2012-04-08T22:52:38.983

Reputation: 1 841

Seems to me that this repeats an existing answer. – harrymc – 2012-04-13T18:45:31.917