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

I would like to know how HTTP tunnels work. I tried Google but didn't find what I was looking for.

As far as I know HTTP proxies are like reverse proxys. You request a website, HTTP proxy gets and understands this request and sends it to the origial server. Answer goes from original server to HTTP proxy and back to your PC. Other than SOCKS proxy which just tunnel TCP/IP, a HTTP proxy reads the HTTP-Request, right?

If that is right, here is my question:
How can you tunnel other protocols through an HTTP proxy? E.g. Instant Messengers offer such proxy settings and they use their own protocol.

share|improve this question
up vote 3 down vote accepted

Besides the usual GET/POST/HEAD/PUT, many HTTP proxy servers understand an additional CONNECT request, which establishes a raw TCP connection to the remote host. This is required to properly support HTTPS, but can often be used for other protocols.

 $ nc 8080
<- HTTP/1.0 200 Connection Established
<- Proxy-agent: Apache/2.2.19 (Debian)
<- 220 ESMTP Badger badger badger badger badger postfix postfix!
-> ehlo grawity-pc
<- 250-SIZE 10240000
<- 250-8BITMIME
<- 250 DSN
-> quit
<- 221 2.0.0 Bye
share|improve this answer

You must log in to answer this question.

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