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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user