From 8f45736dd33d4b9ed63e3772d17e09ee5e15f595 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Tue, 2 Jun 2020 20:02:08 +0800 Subject: [PATCH] drain replayed connection --- proxy/vmess/encoding/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/vmess/encoding/server.go b/proxy/vmess/encoding/server.go index 1e36fc24f..eb7d90c11 100644 --- a/proxy/vmess/encoding/server.go +++ b/proxy/vmess/encoding/server.go @@ -182,7 +182,7 @@ func (s *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.Request sid.key = s.requestBodyKey sid.nonce = s.requestBodyIV if !s.sessionHistory.addIfNotExits(sid) { - return nil, newError("duplicated session id, possibly under replay attack") + return nil, drainConnection(newError("duplicated session id, possibly under replay attack")) } s.responseHeader = buffer.Byte(33) // 1 byte