This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes SSL tunneling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "SSL tunneling" Watch "SSL tunneling" New topic

SSL tunneling

Juan Segura

Joined: Apr 20, 2006
Posts: 1

I'm making a Proxy server and I have a problem with the SSL tunneling.
This is the secuence I use:

1. Read de socket information from the client

2. If I receive a CONNECT servername:443 HTTP/1.0... then

3. I open a secure conection with the server using the Microsoft's SslStream for .Net

4. If the conection is stablished then

5. I send a HTTP/1.0 200 Conection established... to then client

6. I read data from the client socket and send without any translation to the server.

7. I read data from the server and send the data without any translation to the client.

8. I loop to point 6 until the connection is closed.

The problem is in point 6. After I send the "Conection established" to the client it return a secuence of binary data. I send this information to the server and the server return an "Bad request" or similars errors, depending on the ssl server that I connect.

I think that the problem wil be that the client socket is an standard Socket object and the server socket is an SslStream object.

Can anybody help me!

Thanks, and sorry for my bad English!

Juan Segura
I agree. Here's the link:
subject: SSL tunneling
Similar Threads
Error in setting SecureRMIClientSocketFactory
Setting proxy authenication in java socket
please answer this 128 questions for WLS. Urgently!
My SCEA Part 1Study Notes