diff --git a/api/apimodel.go b/api/apimodel.go index b11c0ca..4e3e9cb 100644 --- a/api/apimodel.go +++ b/api/apimodel.go @@ -41,6 +41,7 @@ type NodeInfo struct { Path string EnableTLS bool EnableVless bool + VlessFlow string CypherMethod string ServerKey string ServiceName string diff --git a/main/config.yml.example b/main/config.yml.example index 9689cf6..3363ee7 100644 --- a/main/config.yml.example +++ b/main/config.yml.example @@ -22,6 +22,7 @@ Nodes: NodeType: V2ray # Node type: V2ray, Shadowsocks, Trojan, Shadowsocks-Plugin Timeout: 30 # Timeout for the api request EnableVless: false # Enable Vless for V2ray Type + VlessFlow: "xtls-rprx-vision" # Only support vless SpeedLimit: 0 # Mbps, Local settings will replace remote settings, 0 means disable DeviceLimit: 0 # Local settings will replace remote settings, 0 means disable RuleListPath: # /etc/XrayR/rulelist Path to local rulelist file diff --git a/service/controller/userbuilder.go b/service/controller/userbuilder.go index 76f5a03..88e41dd 100644 --- a/service/controller/userbuilder.go +++ b/service/controller/userbuilder.go @@ -47,7 +47,7 @@ func (c *Controller) buildVlessUser(userInfo *[]api.UserInfo) (users []*protocol for i, user := range *userInfo { vlessAccount := &vless.Account{ Id: user.UUID, - Flow: vless.XRV, + Flow: c.nodeInfo.VlessFlow, } users[i] = &protocol.User{ Level: 0,