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

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jul 9 11:16:59 UTC 2014


#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


More information about the tor-bugs mailing list