1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-10-11 11:34:21 -04:00

support enforcing VMessAEAD via environment variable (#596)

* support enforcing VMessAEAD via env var

to prevent downgrade attack

* Add comments to make Codacy Production happy
This commit is contained in:
dyhkwong
2021-02-08 18:08:01 +08:00
committed by GitHub
parent 51af372bed
commit d8bc41e653
2 changed files with 16 additions and 0 deletions

View File

@@ -118,6 +118,11 @@ func NewServerSession(validator *vmess.TimedUserValidator, sessionHistory *Sessi
}
}
// SetAEADForced sets isAEADForced for a ServerSession.
func (s *ServerSession) SetAEADForced(isAEADForced bool) {
s.isAEADForced = isAEADForced
}
func parseSecurityType(b byte) protocol.SecurityType {
if _, f := protocol.SecurityType_name[int32(b)]; f {
st := protocol.SecurityType(b)