Route specific application through a SOCKS5 proxy

2

I need to route a specific set of Linux applications through a proxy. Only processes with those names should be rerouted, all other applications in the system should ignore the proxy and work as usual. proxychains <myapp> <args> and tsocks <myapp> <args> are no option - I need to be able to debug those applications, so they have to be launched on its own. Is it possible?

Artalus

Posted 2018-07-04T17:48:52.237

Reputation: 291

https://github.com/darkk/redsocks . This uses iptables to intercept, instead of library interception. Now the difficulty is to pick specific applications. You can check uid/gid (possibly changing the gid, but with setgid, usually debugging will then require root). My personal choice would be to create a separate network namespace (and all the required configuration) to easily separate them. Good luck – A.B – 2018-07-10T16:32:39.940

No answers