From 793f26e7633c5c98463d590f3c422dbb29804165 Mon Sep 17 00:00:00 2001 From: MengXin239 Date: Sun, 9 Jun 2024 20:52:32 +0800 Subject: [PATCH] fixed some bug --- service/controller/controller.go | 2 +- service/controller/inboundbuilder.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/service/controller/controller.go b/service/controller/controller.go index c1592abd..8138d53b 100644 --- a/service/controller/controller.go +++ b/service/controller/controller.go @@ -406,7 +406,7 @@ func (c *Controller) addNewUser(userInfo *[]api.UserInfo, nodeInfo *api.NodeInfo users := make([]*protocol.User, 0) switch nodeInfo.NodeType { case "V2ray", "Vmess", "Vless": - if nodeInfo.EnableVless { + if nodeInfo.EnableVless || (nodeInfo.NodeType == "Vless" && nodeInfo.NodeType != "Vmess") { users = c.buildVlessUser(userInfo) } else { users = c.buildVmessUser(userInfo) diff --git a/service/controller/inboundbuilder.go b/service/controller/inboundbuilder.go index bc1c8fe5..ba3d667f 100644 --- a/service/controller/inboundbuilder.go +++ b/service/controller/inboundbuilder.go @@ -58,7 +58,7 @@ func InboundBuilder(config *Config, nodeInfo *api.NodeInfo, tag string) (*core.I // Build Protocol and Protocol setting switch nodeInfo.NodeType { case "V2ray", "Vmess", "Vless": - if nodeInfo.EnableVless || nodeInfo.NodeType == "Vless" { + if nodeInfo.EnableVless || (nodeInfo.NodeType == "Vless" && nodeInfo.NodeType != "Vmess") { protocol = "vless" // Enable fallback if config.EnableFallback {