Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

4 Answers 4

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.

share|improve this answer
    
How it receive the requests? It create a new interface? –  gsc-frank 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. 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 ;) –  gsc-frank 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 9:20

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

share|improve this answer
    
+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
    
Didn't know about DANTE, thanks. –  mgorven May 14 '12 at 18:37

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
share|improve this answer
    
Eeeew. LD_PRELOAD. Seriously deep magic right there. Have a +1 –  Tom O'Connor May 14 '12 at 10:37

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.