[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #12535 [Pluggable transport]: goptlib should expose a SOCKS5 server instead of SOCKS4a.



#12535: goptlib should expose a SOCKS5 server instead of SOCKS4a.
-------------------------------------+----------------------------
     Reporter:  yawning              |      Owner:  yawning
         Type:  defect               |     Status:  new
     Priority:  normal               |  Milestone:
    Component:  Pluggable transport  |    Version:
   Resolution:                       |   Keywords:  goptlib, socks
Actual Points:                       |  Parent ID:
       Points:                       |
-------------------------------------+----------------------------

Comment (by yawning):

 Ok, this still needs tests but it resolves most of the things in first
 revision that I was unhappy about by using the magic of goroutines and
 channels.

 Now, each `SocksListener` has a goroutine that handles accepting new
 connections, and dispatches another goroutine that does the SOCKS
 handshake and places the `SocksConn` into a channel.  Accept consumes off
 the channel instead (so can't fail unless trying to `Accept` on a
 `SocksListener` that has been closed).  Error handling is done entirely by
 the goroutine(s).

 This also fixes a bug inherited from the original code.  If either of the
 `SetDeadline` calls in `AcceptSocks` fail (unlikely), the file descriptor
 will be leaked (Unless the GC will happen to take care of closing them).

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12535#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs