Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Consider a firewalled network with the high-level requirement that normal web browsing should work, but nothing else (e.g. ssh and Skype are forbidden). All traffic is blocked, except for outgoing HTTP(S) traffic which goes via a mandatory proxy.

What should the proxy do with HTTP CONNECT traffic? At one extreme, it could allow everything through, which would make the firewall ineffective. At the other extreme, it could be blocked: would this completely block HTTPS (I've noticed that wget uses CONNECT to tunnel https through $https_proxy: is this the universal method?)? (Assume the proxy is not going to play man-in-the-middle hoping that clients wouldn't notice the fake certificates.)

In other words, what is the practical “normal” use of CONNECT (with a proxy in the mix), and what is a good approximation of restricting its use to the “normal” cases?

(This is what I meant to ask when I asked my previous question.)

share|improve this question
up vote 1 down vote accepted

CONNECT is used to establish a bidirectionnal connection between the client and the remote server through the proxy. The protocol which passes inside the connection is just a problem between the client and the server, and does not concern the proxy. Most uses are for HTTPS, some uses are for WebSocket, other uses for remote desktop protocols, some people "illegaly" use it for SMTP, SSH, TELNET, or even HTTP in HTTP (to bypass controls).

That's why access to the CONNECT method much be restricted if you're trying to build a secure solution. First you must restrict the outgoing ports (allow only 443) and if your proxy can do that, you should ensure that what is transported really looks like SSL and not something else (eg: some people have an SSH backdoor on their HTTPS servers).

share|improve this answer

Your Answer


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.