mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 18:08:14 -05:00
commit
da3ade7b34
@ -3,6 +3,7 @@ package xray
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/Yuzuki616/V2bX/api/panel"
|
"github.com/Yuzuki616/V2bX/api/panel"
|
||||||
"github.com/Yuzuki616/V2bX/common/format"
|
"github.com/Yuzuki616/V2bX/common/format"
|
||||||
vCore "github.com/Yuzuki616/V2bX/core"
|
vCore "github.com/Yuzuki616/V2bX/core"
|
||||||
@ -73,24 +74,11 @@ func (c *Core) AddUsers(p *vCore.AddUsersParams) (added int, err error) {
|
|||||||
users := make([]*protocol.User, 0, len(p.UserInfo))
|
users := make([]*protocol.User, 0, len(p.UserInfo))
|
||||||
switch p.NodeInfo.Type {
|
switch p.NodeInfo.Type {
|
||||||
case "v2ray":
|
case "v2ray":
|
||||||
if p.Config.XrayOptions.EnableVless ||
|
if p.NodeInfo.ExtraConfig.EnableVless {
|
||||||
p.NodeInfo.ExtraConfig.EnableVless {
|
users = buildVlessUsers(p.Tag, p.UserInfo, p.NodeInfo.ExtraConfig.VlessFlow)
|
||||||
if p.Config.XrayOptions.VlessFlow != "" {
|
|
||||||
if p.Config.XrayOptions.VlessFlow == p.NodeInfo.ExtraConfig.VlessFlow {
|
|
||||||
// local
|
|
||||||
users = buildVlessUsers(p.Tag, p.UserInfo, p.Config.XrayOptions.VlessFlow)
|
|
||||||
} else {
|
|
||||||
// remote
|
|
||||||
users = buildVlessUsers(p.Tag, p.UserInfo, p.NodeInfo.ExtraConfig.VlessFlow)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// remote
|
|
||||||
users = buildVlessUsers(p.Tag, p.UserInfo, p.NodeInfo.ExtraConfig.VlessFlow)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
users = buildVmessUsers(p.Tag, p.UserInfo)
|
users = buildVmessUsers(p.Tag, p.UserInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
case "trojan":
|
case "trojan":
|
||||||
users = buildTrojanUsers(p.Tag, p.UserInfo)
|
users = buildTrojanUsers(p.Tag, p.UserInfo)
|
||||||
case "shadowsocks":
|
case "shadowsocks":
|
||||||
|
Loading…
Reference in New Issue
Block a user