Hello everyone. i have a simple question i am using a tor client to connect programmatically to tor via Socks4a. Everything run smoothly but when i tried to add ssl-tls to connect to localhost i got the message below.

Socks version 22 not recognized. (Tor is not an http proxy.) 

The reason that i want to implement ssl-tls is to prevent someone doing MITM between my pc and the proxy which has been setted localhost. Is this possible via socks proxy?

1 Answer 1


You're not trying to speak SOCKS, the SOCKS port only speaks the SOCKS protocol.

Decimal 22 is hexadecimal 0x16, which is the initial byte of a TLS connection. Tor's SOCKS port does not speak TLS. You cannot arbitrarily add TLS onto the SOCKS connection.

No one can MITM between you and a localhost proxy without being an administrator or having privileges on your local computer. If they a are local administrator then adding TLS will not stop them performing MITM or worse.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .