2

Exist a way to convert a local socks proxy into a local interface? My problem is that some application don't have the possibility to specify a socks proxy, and I need that all my communication pass through my local socks proxy.

4 Answers4

5

Presenting a network interface would be only partially useful - as routing is accomplished based on the destination address and not the source address or the interface a socket is bound to (with the notable exception of using alternate routing tables), simply having a socksified interface would not make your processes send requests through it.

For Linux platforms, running socksify <application> is going to give you what you want - transparent SOCKS proxying. The socksify script and the accompanying binaries are part of the DANTE package. There also is the possibility of socksifying all processes run on a Linux host by installing DANTE and setting LD_PRELOAD in .bashrc appropriately:

LD_PRELOAD="libdl.so libdsocks.so"
export LD_PRELOAD
the-wabbit
  • 40,737
  • 13
  • 111
  • 174
4

While I haven't tried either of these myself, tun2socks or redsocks seem to do what you're looking for. tun2socks actually creates a new interface, e.g., tun0. I don't think redsocks does, but I may be mistaken.

Snowball
  • 1,503
  • 1
  • 12
  • 13
2

You can use dante or tsocks to send all traffic from specific applications via a SOCKS server.

mgorven
  • 30,615
  • 7
  • 79
  • 122
  • +1 for the principle, although `tsocks´ is horribly old and no longer updated and newer, maintained implementations (DANTE comes to mind) are surely to be preferred. – the-wabbit May 14 '12 at 10:28
1

You can use privoxy. It is a proxy server that can talk to a socks proxy. You need to change privoxy configuration file to include a line like:

forward-socks5   /               127.0.0.1:9050 .

In this example, it forwards all requests it receives to SOCKS v5 proxy on localhost port 9050.

Khaled
  • 36,533
  • 8
  • 72
  • 99
  • How it receive the requests? It create a new interface? –  May 13 '12 at 15:11
  • @frankabel: It presents a normal HTTP proxy interface. – Khaled May 13 '12 at 15:11
  • That is not what I'm finding, I need something that be transparent to clients programs, as I said, some client programmers don't have the capability to specify socks proxy (neither any other kind of proxy), but still I want the communication of those problem go through my local socks proxy. http://en.wikipedia.org/wiki/Comparison_of_proxifiers seem to me that is what I need, now the problem is what is the best of those available options ;) –  May 13 '12 at 15:25
  • @frankabel just take your criteria and match against the featuregrids in the referenced Wikipedia article. Or, if this would not do for you, test several of them by yourself. – the-wabbit May 15 '12 at 09:20