You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 5, 2024. It is now read-only.
TorSocket delegates the socket.isConnected() call to SocksSocket which always returns false, even when the TorSocket has successfully connected to the endpoint.
This is a problem when wrapping the TorSocket in a java SSLSocket, as the first thing that SSLSocketImpl does is check if the socket is connected: if (!sock.isConnected()) { throw new SocketException("Underlying socket is not connected"); }
While it's unnecessary to wrap Tor connections in SSL, sometimes you don't get a choice of server protocol.
A workaround is to use Java reflection to retrieve SocksSocket from TorSocket and set the connected member variable to true.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
TorSocket delegates the socket.isConnected() call to SocksSocket which always returns false, even when the TorSocket has successfully connected to the endpoint.
This is a problem when wrapping the TorSocket in a java SSLSocket, as the first thing that SSLSocketImpl does is check if the socket is connected:
if (!sock.isConnected()) { throw new SocketException("Underlying socket is not connected"); }
While it's unnecessary to wrap Tor connections in SSL, sometimes you don't get a choice of server protocol.
A workaround is to use Java reflection to retrieve SocksSocket from TorSocket and set the connected member variable to true.
The text was updated successfully, but these errors were encountered: