The SSL Tunneling Protocol allows any proxy server which supports it the ability to act as a tunnel for SSL enhanced protocols.  This feature is essential to support normal web traffic and increasingly SSL is being used to secure normal web requests which would previously have been sent in clear text.    The client makes the initial HTTP request to the proxy and asks for an SSL tunnel.  If we look at the protocol level the actual handshake to establish the SSL tunneling connection is fairly straight-forward.

The connection is simple and in fact looks like virtually any other HTTP request, the only difference is that we use a new ‘Connect’ method.   The format is also slightly different as the parameter is not a full url but rather the destination host address and the post number in the format 192.168.1.1:8080.      The port number is always required with these connection requests, as the default number is generic and not always correct.

When the client has received a successful response then the connection will pass all data in both directions to the destination server.  For the proxy server much of it’s role in authentication and establishing the connection is over, and it’s role is then limited to simply forwarding data for the connection.   The final significant role for the proxy server is to close the connection which it will do when it receives a close request from either the client or the server.

Other situations where the connection will be closed mainly refer to error status codes.  For example an error generated in response to authentication would be a typical situation where authentication has failed.  Most proxies will require some sort of authentication especially the high quality US proxies such as this.  The methods might change however from a simple username password supplied via a challenge and response to pass through authentication from a system like the Active Directory or LDAP.

It’s interesting to note that the mechanism used to handle SSL tunnelling is not actually specific to this protocol.  It is in fact a generic technique which can be used to tunnel any protocol including SSL.   There is no actual reliance on any SSL support from the proxy, which can be confusing when you see people look for SSL enabled proxies online.    It is not required on a properly configured proxy server as the data is simply transported there is no need for the actual protocol to be understood after the initial connection request.

There are issues with some protocols transferring through proxies, certain specialised protocols need more support than is offered with the standard tunneling mechanism.  For example for many years LDAP (Lightweight Directory Access Protocol) was not able to work across most common proxies.  Some implementations support LDAP by using SOCKS while there is some difficulty with LDAP queries being cached and subsequently causing performance issues.    Most protocols however work perfectly with this ‘hands off’ tunneling mechanism which you can see perfectly illustrated if you try and stream video through proxies like this which used to circumvent BBC iPlayer blocked abroad.

 

Leave a Reply

Your email address will not be published. Required fields are marked *