HTTP(s) Tunnelling. How?

Ok, here's the situation, I have written an instant messenger (as has everyone here by all accounts). Currently the applet that the client uses connects back to the host and sends serialised messages back and forth between the two.

However my company now want to know whats involved in hiding this applet behind their HTTPS web server so it's buried in their more secure intranet.

I've never looked at this sort of thing before and would be grateful of a few pointers - is it just a case of using HttpURLConnect for example or is there something more with HTTPS?

Any help greatly appreciated.

MrChris

[641 byte] By [BluSeiger] at [2007-9-26 7:10:30]
# 1

java.net.HttpURLConnection does not support HTTPS connections. In fact, standard Java SDK does not come with a stream handler for the HTTPS protocol.

Generally speaking, you will need to use a provider that has the said type of handler and supports HTTPS protocol.

Take a llok at Java Secure Socket Extension. JSSE for short. http://java.sun.com/products/jsse/index.html

Also, if a general client is expected to connect to the server through a proxy (may or may not be due to a firewall configured between client and server), you would have to setup specific system properties on your client-side

Because you are specifically dealing with an applet, it is recommened that you see http://java.sun.com/products/plugin/1.3/docs/https.html

neville_sequeira at 2007-7-1 16:53:19 > top of Java-index,Archived Forums,Socket Programming...
# 2

Ok, so if I've read that correctly all I need to do if I'm using the plug-in (which I am), is connect back to the server using an URLConnection object.

I can then do what I would normally do with the input/output streams (in this case wrap them in ObjectInput/Output objects for sending serialised objects).

The only problem I will incur is if the server side uses SSL around the HTTPS connection, in which case I need to bundle JSSE with the applet.

Sounds fair enough.

Thanks for your help.

MrChris

BluSeiger at 2007-7-1 16:53:19 > top of Java-index,Archived Forums,Socket Programming...