0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-12 03:19:36 +03:00

feat: enforcing VMessAEAD via environment variable (#334)

This commit is contained in:
秋のかえで
2021-03-05 16:41:51 +08:00
committed by GitHub
parent 1dae2c5636
commit 6380abca73
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)