[tor-bugs] #11138 [Tor]: Improve code handling SOCKS connection in tor daemon

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Mar 7 19:36:17 UTC 2014

#11138: Improve code handling SOCKS connection in tor daemon
     Reporter:  dgoulet      |      Owner:
         Type:  enhancement  |     Status:  new
     Priority:  normal       |  Milestone:  Tor: 0.2.6.x-final
    Component:  Tor          |    Version:
   Resolution:               |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |

Comment (by nickm):

 Hm. One problem with reusing that code is that Tor's SOCKS code needs to
 be nonblocking. IOW, you can't call "recv, then parse, then recv."  Also,
 it works with data types that do not guarantee that the data is stored

 Right now it's in the 370-line parse_socks() doom-function in
 src/or/buffers.c .   Have a look. :)

 You might be able to re-use some of the test-logic here, of course: It's
 possible to emulate blocking with non-blocking, and then you could re-use
 the tests for the blocking mode.

Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11138#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online

More information about the tor-bugs mailing list