Socks 5 Proxy do not work properly on ADC(S)

Bug #1856087 reported by laurent
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Socks 5 proxies work pretty well on NMDC hubs, upload/download filelists and transfers are ok.

On the other hand, on ADC hubs, i can connect to main hubs but transfers are not delivered, incoming filelist petition do not even appear on the transfer windows, nor it appears on target user when the proxy client ask for a filelist.

On ADCS is not even possible to connect, i got "[19:16] *** The operation completed successfully." but nothing more happens, the client does not connect to the hub.

Thanks for reading!

laurent (laurent456)
affects: dcplusplus → airdcpp
affects: airdcpp → dcplusplus
Revision history for this message
maksis (maksis) wrote :

I spent some time on the socks-related code and I was able to spot a few issues:

Socket::socksUpdated (UDP, initialization)
- the function wasn't called on startup so the UDP functionality was initialized only after updating settings
- waitConnected was missing after connect, causing the initialization to always fail
- there was no proper error handling so the initialization and all attempts to send search results to active users over UDP just silently failed (and there are lots of SOCKS5 servers that don't support UDP data)

Socket::writeTo (UDP, sending)
- native socket was never created, causing all sending attempts to fail
- remote port was never sent to the socks server, causing all UDP data to be forwarded to a random port

- overloaded functions (read/write/waitConnected) from SSLSocket were used, causing all connection attempts to the socks server to fail for secure sockets

Additionally I've fixed a few issues with error reporting (including "The operation completed successfully") and added full IPv6 support for SOCKS5:

Fixes are available in the latest beta version of AirDC++

Changed in airdcpp:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers