Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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

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

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .