Ver Fonte

dont reuse shadowsock connections

Darien Raymond há 9 anos atrás
pai
commit
c5a92e00ef
2 ficheiros alterados com 3 adições e 0 exclusões
  1. 2 0
      proxy/shadowsocks/client.go
  2. 1 0
      proxy/shadowsocks/server.go

+ 2 - 0
proxy/shadowsocks/client.go

@@ -61,6 +61,8 @@ func (this *Client) Dispatch(destination v2net.Destination, payload *alloc.Buffe
 	}
 	log.Info("Shadowsocks|Client: Tunneling request to ", destination, " via ", server.Destination())
 
+	conn.SetReusable(false)
+
 	request := &protocol.RequestHeader{
 		Version: Version,
 		Address: destination.Address,

+ 1 - 0
proxy/shadowsocks/server.go

@@ -146,6 +146,7 @@ func (this *Server) handlerUDPPayload(payload *alloc.Buffer, session *proxy.Sess
 
 func (this *Server) handleConnection(conn internet.Connection) {
 	defer conn.Close()
+	conn.SetReusable(false)
 
 	timedReader := v2net.NewTimeOutReader(16, conn)
 	defer timedReader.Release()