can you set socks5 proxy from Linux command line?

I've managed to set a socks5 proxy server from Linux towards another server like this :

ssh -D 9090 -N -f user@192.168.76.102Then I changed the settings in mozilla browser to use the socks proxy, and it works, I can surf the internet. What I want do is to set this setting in Linux command line, so I can have access to the internet from there , like so : wget . First I tried editing the /etc/environmental file :

export http_proxy=socks5://127.0.0.1:9090 

But it doesn't work :

wget
Error parsing proxy URL socks5://127.0.0.1:9090: Unsupported scheme ‘socks5’.

Then I installed proxychains4 , and added in /etc/proxychains4.conf :

socks5 127.0.0.1 9090

But still doesn't work :

Resolving ()... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘

Do you have any ideas how I can make this work ?

Thanks.

1 Answer

You are using the wrong tool to test your SOCKS proxy settings. wget does not have built-in support for SOCKS, it has support for HTTP / HTTPS.

curl on the other hand has built-in support for SOCKS and thus you should use it instead.

See man curl for information and usage.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like