mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
use route group to storage extra config
This commit is contained in:
@@ -102,6 +102,25 @@ func BuildInbound(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, tag s
|
||||
}
|
||||
}
|
||||
}
|
||||
// use remote reality replace local config
|
||||
if nodeInfo.ExtraConfig.EnableReality {
|
||||
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)
|
||||
}
|
||||
in.StreamSetting.REALITYSettings = &coreConf.REALITYConfig{
|
||||
Dest: d,
|
||||
Xver: rc.Xver,
|
||||
ServerNames: rc.ServerNames,
|
||||
PrivateKey: rc.PrivateKey,
|
||||
MinClientVer: rc.MinClientVer,
|
||||
MaxClientVer: rc.MaxClientVer,
|
||||
MaxTimeDiff: rc.MaxTimeDiff,
|
||||
ShortIds: rc.ShortIds,
|
||||
}
|
||||
}
|
||||
// Support ProxyProtocol for any transport protocol
|
||||
if *in.StreamSetting.Network != "tcp" &&
|
||||
*in.StreamSetting.Network != "ws" &&
|
||||
@@ -117,7 +136,8 @@ func BuildInbound(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, tag s
|
||||
}
|
||||
|
||||
func buildV2ray(config *conf.ControllerConfig, nodeInfo *panel.NodeInfo, inbound *coreConf.InboundDetourConfig) error {
|
||||
if config.XrayOptions.EnableVless {
|
||||
if config.XrayOptions.EnableVless ||
|
||||
nodeInfo.ExtraConfig.EnableVless {
|
||||
//Set vless
|
||||
inbound.Protocol = "vless"
|
||||
if config.XrayOptions.EnableFallback {
|
||||
|
||||
Reference in New Issue
Block a user