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
When trying to use DatagramSocket.connect on a derived Socks5DatagramSocket, you will run into IllegalArgumentException "connected address and packet address differ". This is because the connect method is not overloaded to connect to the relayInetSocketAddress. This way, the socket is actually connected to the final destination address, leading to an address conflict with the encapsulated DatagramPacket.
To fix, overload connect() to transparently connect to relayInetSocketAddress instead. Additionally, you should store the InetSocketAddress given to connect by the caller and check equals in the overloaded send methods.
The text was updated successfully, but these errors were encountered:
When trying to use DatagramSocket.connect on a derived Socks5DatagramSocket, you will run into IllegalArgumentException "connected address and packet address differ". This is because the connect method is not overloaded to connect to the relayInetSocketAddress. This way, the socket is actually connected to the final destination address, leading to an address conflict with the encapsulated DatagramPacket.
To fix, overload connect() to transparently connect to relayInetSocketAddress instead. Additionally, you should store the InetSocketAddress given to connect by the caller and check equals in the overloaded send methods.
The text was updated successfully, but these errors were encountered: