From 6a29fa5fe2bd0cb51befc49045b77d776784b8e3 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Sat, 6 Jun 2020 20:37:30 +0800 Subject: [PATCH] Enable AEAD by Default --- proxy/vmess/encoding/client.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/proxy/vmess/encoding/client.go b/proxy/vmess/encoding/client.go index 4d7e17765..2436dab83 100644 --- a/proxy/vmess/encoding/client.go +++ b/proxy/vmess/encoding/client.go @@ -55,13 +55,19 @@ func NewClientSession(idHash protocol.IDHash) *ClientSession { session := &ClientSession{} - session.isAEADRequest = false + session.isAEADRequest = true if vmessexp, vmessexp_found := os.LookupEnv("VMESSAEADEXPERIMENT"); vmessexp_found { if vmessexp == "y" { session.isAEADRequest = true - fmt.Println("=======VMESSAEADEXPERIMENT ENABLED========") } + if vmessexp == "n" { + session.isAEADRequest = false + } + } + + if session.isAEADRequest { + fmt.Println("=======VMESSAEADEXPERIMENT ENABLED========") } copy(session.requestBodyKey[:], randomBytes[:16])