Open sedrubal opened 7 years ago
I've been blocked on the (lack of) tooling. If someone else wants to take it up, that's fine. Parsley on python 3 doesn't support parsing bytes or network protocols yet, which is a prerequisite.
@habnabit @meeja: have you ever performed a complete analysis of what would be needed in order to port txsocks to py3?
on GlobaLeaks this is becoming a requirement in relation to ubuntu 18.04 that will have natively py3; Thei announced it with ubuntu 16.04 and now they seems more near. :(
\cc @ncommander @fpietrosanti
python3 support -> https://github.com/unk2k/txsocksx
@unk2k I appreciate the effort, but this isn't "support". The tests fail, and it isn't configured to run 3.x on travis anyway.
I am working on this. Will have a patch ready for the grammar.py part soon. It will be backwards compatible with Python2.
A small introduction. I am heading Python3 port of the tahoe-lafs project [ https://github.com/tahoe-lafs/tahoe-lafs ] for which txsocksx is a dependency via foolscap [ https://github.com/warner/foolscap ]. Hence porting txsocksx to Python3 is an upstream requirement for tahoe-lafs.
I am trying to do a cross 2-3 compatible port using six .
I am working on the tests now and got the grammar unit test passing on 2 and 3 (3.5). In another week I should have all the unit tests passing and should be able to raise a PR.
Thanks :-)
@evilaliv3 txtorcon has its own Python2+Python3 SOCKS5 client -- so for txtorcon anyway, you don't need txsocksx any more. If someone wanted to split this out and release it as its own Twisted python2 + python3 SOCKS5 client, that's cool :) -- not that it's currently doing some custom SOCKS opcodes that Tor uses and does NOT do any server-side things at all. Nor SOCKS4a. So it's not "a txsocksx replacement", it's "enough SOCKS5 so txtorcon can work".
@pythonhacker Would you mind sharing a quick update on your fork? Did you run into any roadblocks? I am interested in picking up where you left off if there is more work complete.
I think what I would consider the right direction to take this project in is to use siosocks
as the thing backing the implementation of the protocol instead of parsley.
I've been working off and on with getting parsley dealing with bytes on python 3, probably by way of getting something set up for sans-IO workflows. I haven't finished it enough to post a new release, but I could publish my work in progress if that's at all tempting. I still think formal grammars for network protocols is a great idea, but I wouldn't want to stall this project on that. siosocks
exists right now, and is good enough for this use case.
For a quick fix I went and used the txtorcon client endpoint :) The changes were minimal.
I agree that using siosoks would be nice.
there is an (attempt at) a sans-io socks5 implementation in txtorcon .. if anyone was motivated to rip that out and improve, that'd be amazing! (and I'd be happy to depend on it instead of an "internal" implementation). Note this is not a complete SOCKS implementation, it's pretty specific to SOCKS5 needs for Tor ...
http://fedora.portingdb.xyz/pkg/python-txsocksx/ :smile: