Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 = http://1.0.0.1:8080 
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

 
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.