commit 8ac7286c2e4ef1a35a384d1e43e74d2e347fbab2 Author: David Fifield david@bamsoftware.com Date: Wed Dec 4 23:22:22 2013 -0800
Change "failed" to "rejected". --- socks/socks.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/socks/socks.go b/socks/socks.go index 8726ceb..0cbbba8 100644 --- a/socks/socks.go +++ b/socks/socks.go @@ -17,7 +17,7 @@ const ( socksCmdConnect = 0x01 socksResponseVersion = 0x00 socksRequestGranted = 0x5a - socksRequestFailed = 0x5b + socksRequestRejected = 0x5b )
type Request struct { @@ -47,12 +47,12 @@ type Request struct { func AwaitSocks4aConnect(conn *net.TCPConn, connect func(string) (*net.TCPAddr, error)) error { req, err := readSocks4aConnect(conn) if err != nil { - sendSocks4aResponseFailed(conn) + sendSocks4aResponseRejected(conn) return err } destAddr, err := connect(req.Target) if err != nil { - sendSocks4aResponseFailed(conn) + sendSocks4aResponseRejected(conn) return err } sendSocks4aResponseGranted(conn, destAddr) @@ -131,6 +131,6 @@ func sendSocks4aResponseGranted(w io.Writer, addr *net.TCPAddr) error { }
// Send a SOCKS4a response code 0x5b (with an all-zero address). -func sendSocks4aResponseFailed(w io.Writer) error { - return sendSocks4aResponse(w, socksRequestFailed, &emptyAddr) +func sendSocks4aResponseRejected(w io.Writer) error { + return sendSocks4aResponse(w, socksRequestRejected, &emptyAddr) }
tor-commits@lists.torproject.org