Add optional aes128xor layer

https://github.com/XTLS/Xray-core/pull/4952#issuecomment-3172703168
This commit is contained in:
RPRX
2025-08-11 12:07:00 +00:00
committed by GitHub
parent 2e6a88307c
commit 7ffb555fc8
11 changed files with 146 additions and 36 deletions

View File

@@ -87,7 +87,7 @@ func New(ctx context.Context, config *Config, dc dns.Client, validator vless.Val
d, _ := base64.RawURLEncoding.DecodeString(config.Decryption)
if len(d) == 64 {
handler.decryption = &encryption.ServerInstance{}
if err := handler.decryption.Init(d, time.Duration(config.Minutes)*time.Minute); err != nil {
if err := handler.decryption.Init(d, config.Xor, time.Duration(config.Minutes)*time.Minute); err != nil {
return nil, errors.New("failed to use mlkem768seed").Base(err).AtError()
}
}