fix: 缺少mldsa65参数导致无法启动

This commit is contained in:
wyx2685
2025-07-24 00:07:19 +09:00
parent 39dfd8b6dd
commit 32437f5e48
2 changed files with 14 additions and 6 deletions

View File

@@ -75,12 +75,13 @@ type VAllssNode struct {
} }
type TlsSettings struct { type TlsSettings struct {
ServerName string `json:"server_name"` ServerName string `json:"server_name"`
Dest string `json:"dest"` Dest string `json:"dest"`
ServerPort string `json:"server_port"` ServerPort string `json:"server_port"`
ShortId string `json:"short_id"` ShortId string `json:"short_id"`
PrivateKey string `json:"private_key"` PrivateKey string `json:"private_key"`
Xver uint64 `json:"xver,string"` Mldsa65Seed string `json:"mldsa65Seed"`
Xver uint64 `json:"xver,string"`
} }
type RealityConfig struct { type RealityConfig struct {

View File

@@ -130,6 +130,12 @@ func buildInbound(option *conf.Options, nodeInfo *panel.NodeInfo, tag string) (*
return nil, fmt.Errorf("marshal reality dest error: %s", err) return nil, fmt.Errorf("marshal reality dest error: %s", err)
} }
mtd, _ := time.ParseDuration(v.RealityConfig.MaxTimeDiff) mtd, _ := time.ParseDuration(v.RealityConfig.MaxTimeDiff)
mldsa65Seed := v.TlsSettings.Mldsa65Seed
if mldsa65Seed == "" {
var seed [32]byte
rand.Read(seed[:])
mldsa65Seed = base64.RawURLEncoding.EncodeToString(seed[:])
}
in.StreamSetting.REALITYSettings = &coreConf.REALITYConfig{ in.StreamSetting.REALITYSettings = &coreConf.REALITYConfig{
Dest: d, Dest: d,
Xver: xver, Xver: xver,
@@ -139,6 +145,7 @@ func buildInbound(option *conf.Options, nodeInfo *panel.NodeInfo, tag string) (*
MaxClientVer: v.RealityConfig.MaxClientVer, MaxClientVer: v.RealityConfig.MaxClientVer,
MaxTimeDiff: uint64(mtd.Microseconds()), MaxTimeDiff: uint64(mtd.Microseconds()),
ShortIds: []string{v.TlsSettings.ShortId}, ShortIds: []string{v.TlsSettings.ShortId},
Mldsa65Seed: mldsa65Seed,
} }
default: default:
break break