IndySockets / Indy

Indy - Internet Direct
https://www.indyproject.org
451 stars 153 forks source link

Bugs in TIdSocksServer #456

Closed rlebeau closed 1 year ago

rlebeau commented 1 year ago

SendV4Response() sets LResponse[0] (the reply version number) to 4, but the SOCKS4 spec says it should be set to 0 instead.

HandleConnectV4() calls SendV4Response(AContext, 90) if successful, but that is premature as that same response is sent later on by CommandConnect() if TIdTCPClient.Connect() is successful. HandleConnectV4() is meant to only parse the request fields, it does not make the actual connection to the next server.