mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-07-27 12:24:14 +00:00
REALITY config: Convert mldsa65Seed
to its private key later
This commit is contained in:
parent
955a569181
commit
31b508d372
4 changed files with 58 additions and 59 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/cloudflare/circl/sign/mldsa/mldsa65"
|
||||
"github.com/xtls/reality"
|
||||
"github.com/xtls/xray-core/common/errors"
|
||||
"github.com/xtls/xray-core/transport/internet"
|
||||
|
@ -27,13 +28,15 @@ func (c *Config) GetREALITYConfig() *reality.Config {
|
|||
MaxClientVer: c.MaxClientVer,
|
||||
MaxTimeDiff: time.Duration(c.MaxTimeDiff) * time.Millisecond,
|
||||
|
||||
Mldsa65Key: c.Mldsa65Key,
|
||||
|
||||
NextProtos: nil, // should be nil
|
||||
SessionTicketsDisabled: true,
|
||||
|
||||
KeyLogWriter: KeyLogWriterFromConfig(c),
|
||||
}
|
||||
if c.Mldsa65Seed != nil {
|
||||
_, key := mldsa65.NewKeyFromSeed((*[32]byte)(c.Mldsa65Seed))
|
||||
config.Mldsa65Key = key.Bytes()
|
||||
}
|
||||
if c.LimitFallbackUpload != nil {
|
||||
config.LimitFallbackUpload.AfterBytes = c.LimitFallbackUpload.AfterBytes
|
||||
config.LimitFallbackUpload.BytesPerSec = c.LimitFallbackUpload.BytesPerSec
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue