twisted-socks icon indicating copy to clipboard operation
twisted-socks copied to clipboard

Support for version 4 and 5

Open NikolaiT opened this issue 11 years ago • 2 comments

Hey Linus

I added in a fork of twisted-socks support for SOCKS version 4 and 5. https://github.com/NikolaiT/twisted-socks

What do you think of it? Can you say shortly if I broke some twisted paradigm or made a major mistake elsewhere?

Regards

NikolaiT avatar Jan 28 '14 23:01 NikolaiT

Cool!

Haven't looked closely, but a couple of points:

  • could 4 and 4a client protocols share more code?
  • are you giving up your copyright to tor project? (socksclient.py)
  • i'd actually be interested in gssapi support
  • did you test it? does SOCKS4a still work?
  • seems like you changed the behaviour when it comes to socks username and password, or am I reading this wrong?

ln5 avatar Feb 02 '14 13:02 ln5

Hey

  • 4a inherits the class from 4 and just overwrites the sendRelayRequest() method, that is responsible for connecting to the socks server (Because 4a also provides remote hostname resolving)
  • Sure, the copyright stays the same as the source had before I built on it (TOR)
  • gssapi will follow as soon as I have time :)
  • I tested (manually) all the code for
    • v5 with dante socks server on my VPS
    • v4 and v4a with TOR (127.0.0.1:9050) and twistd -n socks
  • Socks username/password is a authentication mechanism for v5, so it's a internal to the protocol, but maybe I am getting your question wrong here?

Edit: I tested again all versions, seems like the basic functionality works just fine!

Link to repo: https://github.com/NikolaiT/twisted-socks/

Cheers

NikolaiT avatar Feb 04 '14 10:02 NikolaiT