Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I know how to use http_proxy to redirect http request, but how to redirect the data with a socket5 proxy such as a SSH tunnel?

share|improve this question
    
What do you mean? Do you want to redirect the output of a command through the network? Or to redirect an HTTP request through an SSH tunnel? Or something else? Please clarify. –  Gilles Apr 2 '12 at 22:45
add comment

2 Answers 2

Look at the tsocks application, it is able to transparently redirect every network request of a controlled application through a given socks proxy.

share|improve this answer
add comment

For bash network request to redirect through socket5 proxy, you have to export http_proxy variable:

$ export http_proxy=socks5://username:passwd@socks5_proxy_ip:port

share|improve this answer
1  
This is unrelated to bash, it is up the the started application if to use or not the value of that variable. –  enzotib Apr 2 '12 at 6:57
    
I encourted the Unsupported scheme socks5'` error. –  yangchenyun Apr 3 '12 at 5:57
add comment

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.