[JAVA-2626] Tunneling SSL Through the Proxy Server Created: 09/Oct/17  Updated: 25/Jan/18  Resolved: 25/Jan/18

Status: Closed
Project: Java Driver
Component/s: Security, Session Management
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Nishant Bhardwaj Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File Socket_test_proxy_SSLProxy.java    
Issue Links:
Related

 Description   

Hello,

For non-SSL connections one can overload createSocket() constructor to return sockets configured to use Proxy.

Case for SSL sockets is different. As per documentation for SSLSocketFactory createSocket(Socket s, String host, int port, boolean autoClose) can be used when tunneling SSL through a proxy:

Returns a _socket layered over an existing socket connected to the named host, at the given port. This constructor can be used when tunneling SSL through a proxy or when negotiating the use of SSL over an existing socket. The host and port refer to the logical peer destination. This socket is configured using the socket options established for this factory._

For our Java Driver, currently it is not possible to configure Proxy for SSL connections by overriding this method because we create the socket first, then initialize it before connecting. We'd need an SocketFactory that can handle that workflow or change how we create the socket.


Generated at Thu Feb 08 08:57:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.