Open evilaliv3 opened 8 years ago
How would you want this to be exposed? Buffering is easy enough, but the exact desired semantics are not entirely clear. It seems like the naïve solution is to just allow users to say "I want to be an optimistic client" which will make the endpoint fire the returned Deferred
as soon as the connection is established, expecting the server to report success.
yep! this is exactly my thinking.
i think a simple configuration variable at object instantiation would be enough
@habnabit can i remind you of this ticket ? :)
Currently txsocksx seems to lack of any support for optimistic socks like specified and implemented in Tor: https://gitweb.torproject.org/torspec.git/tree/proposals/181-optimistic-data-client.txt https://trac.torproject.org/projects/tor/ticket/3564
The feature is already been implemented by the custom socks implementation integrated in tor2web: https://github.com/globaleaks/Tor2web/blob/master/tor2web/utils/socks.py
As shown in tor2web to implement the feature is really straightforward; simply it is possible to provide a callback to the user factory as the sock connection is enstablished by storing the data sent by the client in a temporary buffer to be pushed out upon real completion of socks setup.