fix: wrong typo

This commit is contained in:
cubemaze
2023-07-19 23:41:42 +08:00
parent 7e0b9f694b
commit d2ead10ddf
3 changed files with 14 additions and 11 deletions

View File

@@ -6,6 +6,7 @@ import (
"encoding/hex"
"errors"
"fmt"
"strconv"
"github.com/Yuzuki616/V2bX/api/panel"
"github.com/Yuzuki616/V2bX/conf"
@@ -90,21 +91,23 @@ func buildInbound(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, tag s
}
case "remote":
default:
if nodeInfo.ExtraConfig.EnableReality {
if nodeInfo.ExtraConfig.EnableReality == "true" {
rc := nodeInfo.ExtraConfig.RealityConfig
in.StreamSetting.Security = "reality"
d, err := json.Marshal(rc.Dest)
if err != nil {
return nil, fmt.Errorf("marshal reality dest error: %s", err)
}
Xver, _ := strconv.ParseUint(rc.Xver, 10, 64)
MaxTimeDiff, _ := strconv.ParseUint(rc.Xver, 10, 64)
in.StreamSetting.REALITYSettings = &coreConf.REALITYConfig{
Dest: d,
Xver: rc.Xver,
Xver: Xver,
ServerNames: rc.ServerNames,
PrivateKey: rc.PrivateKey,
MinClientVer: rc.MinClientVer,
MaxClientVer: rc.MaxClientVer,
MaxTimeDiff: rc.MaxTimeDiff,
MaxTimeDiff: MaxTimeDiff,
ShortIds: rc.ShortIds,
}
} else {
@@ -138,7 +141,7 @@ func buildInbound(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, tag s
}
func buildV2ray(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, inbound *coreConf.InboundDetourConfig) error {
if nodeInfo.ExtraConfig.EnableVless {
if nodeInfo.ExtraConfig.EnableVless == "true" {
//Set vless
inbound.Protocol = "vless"
if config.XrayOptions.EnableFallback {