From 2e46e95536137d604dafc987a16b3d35a41f72a9 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Sun, 8 Jan 2017 23:15:29 +0100 Subject: [PATCH] fix #277 --- proxy/socks/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/socks/server.go b/proxy/socks/server.go index a62456f9..9c6b2de2 100644 --- a/proxy/socks/server.go +++ b/proxy/socks/server.go @@ -101,7 +101,7 @@ func (v *Server) handleConnection(connection internet.Connection) { connection.SetReusable(false) - timedReader := v2net.NewTimeOutReader(v.config.Timeout, connection) + timedReader := v2net.NewTimeOutReader(16 /* seconds, for handshake */, connection) reader := bufio.NewReader(timedReader) session := &ServerSession{ @@ -128,6 +128,7 @@ func (v *Server) handleConnection(connection internet.Connection) { log.Info("Socks|Server: TCP Connect request to ", dest) log.Access(clientAddr, dest, log.AccessAccepted, "") + timedReader.SetTimeOut(v.config.Timeout) v.transport(reader, connection, session) return }