Take the 2-minute tour ×

Is there a simple command to run in a Linux terminal to tell if a proxy is SOCKS or HTTP?

share|improve this question
add comment

3 Answers

You could check which of the relevant ports is open (e.g. using telnet). Socks usually uses port 1080, HTTP usually uses 80, 443, 8443 or 8080.

share|improve this answer
add comment

Other then just trying if it's SOCKS or HTTP, no , you can't.

To test if it's a http proxy:

set http_proxy = 
wget --proxy=on http://www.google.com/

This will download the html root of google, and if it has correct content, you know it was a http proxy.

share|improve this answer
add comment

On my SLES11 VM, I run socklist and grep for the port:

dev-s11:~ # socklist | grep 22
tcp 22 21112 0 4345 3 sshd
tcp 22 10473174 0 32616 3 sshd

That tells me whether it's managed by ssh or not. If you are using default ports, http will be 80 and ssh 22. That will get you started - ask more Qs if you need more specifics.

share|improve this answer
add comment

Your Answer


