I am looking to set a proxy for terminal. What I need is I want to send all terminal communications to the internet through a proxy, say tor.
I tried to set a system wide proxy set up. But Terminal doesn't obey the system wide proxy configuration.
Is there any other way to do this?
export the below variables in terminal
and use the following commands to disable proxy
Terminal is not net application. Maybe is better to say, in your case, terminal is container for net application like
ssh
,telnet
,lftp
,wget
,lynx
...Edit your:
Enter the details in this format.
This is for when using
wget
,ftp
,lftp
,telnet
in terminalssh
has no nativeSOCKS
client support, you need to use aProxyCommand
for that, for instance withsocat
:Or use things like
tsocks
to transparently useSOCKS
forTCP
traffic.For
SOCKS5
with socat 2:For HTTP Proxy CONNECT method with socat 2:
In my case I was either missing enclosing inverted comma on both sides. putting
"http//.."
was wrong and not putting anything such ashttp//...
was wrong too. What worked was ..when I used single inverted commas on both sides.export http_proxy='http://username:password@proxyhost:port/' export https_proxy='https://username:password@proxyhost:port/' export ftp_proxy='http://username:password@proxyhost:port/'
Remember these three are 3 commands to be run separately three times.
I set export variables
in ~/.bashrc and /etc/enviroment
using torsocks this can be accomplished like so:
man page:
From my research this was the only thing that worked for me:
Install ProxyChains:
Edit the conf file to use your proxy:
Check the last line and edit it. Then just run:
or whatever command you want to go through the proxy.
This is someone else answer