mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 09:58:14 -05:00
fix file cert mode, support null ShortIds for reality
This commit is contained in:
parent
99ea46457c
commit
cda0b6711e
@ -80,6 +80,9 @@ func buildInbound(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, tag s
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("marshal reality dest error: %s", err)
|
||||
}
|
||||
if len(in.StreamSetting.REALITYSettings.ShortIds) == 0 {
|
||||
config.CertConfig.RealityConfig.ShortIds = []string{""}
|
||||
}
|
||||
in.StreamSetting.REALITYSettings = &coreConf.REALITYConfig{
|
||||
Dest: d,
|
||||
Xver: config.CertConfig.RealityConfig.Xver,
|
||||
@ -99,6 +102,9 @@ func buildInbound(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, tag s
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("marshal reality dest error: %s", err)
|
||||
}
|
||||
if len(rc.ShortIds) == 0 {
|
||||
rc.ShortIds = []string{""}
|
||||
}
|
||||
Xver, _ := strconv.ParseUint(rc.Xver, 10, 64)
|
||||
MaxTimeDiff, _ := strconv.ParseUint(rc.Xver, 10, 64)
|
||||
in.StreamSetting.REALITYSettings = &coreConf.REALITYConfig{
|
||||
|
@ -28,6 +28,7 @@ func (c *Controller) requestCert() error {
|
||||
if c.CertConfig.CertFile == "" || c.CertConfig.KeyFile == "" {
|
||||
return fmt.Errorf("cert file path or key file path not exist")
|
||||
}
|
||||
return nil
|
||||
case "dns", "http":
|
||||
if c.CertConfig.CertFile == "" || c.CertConfig.KeyFile == "" {
|
||||
return fmt.Errorf("cert file path or key file path not exist")
|
||||
|
Loading…
Reference in New Issue
Block a user