Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2626

Tunneling SSL Through the Proxy Server

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            nishant.bhardwaj@mongodb.com Nishant Bhardwaj
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: