MCPcopy Create free account
hub / github.com/PasarGuard/node / setupUserAccount

Function setupUserAccount

backend/xray/user.go:14–42  ·  view source on GitHub ↗
(user *common.User)

Source from the content-addressed store, hash-verified

12)
13
14func setupUserAccount(user *common.User) (api.ProxySettings, error) {
15 settings := api.ProxySettings{}
16 if user.GetProxies().GetVmess() != nil {
17 if vmessAccount, err := api.NewVmessAccount(user); err == nil {
18 settings.Vmess = vmessAccount
19 }
20 }
21
22 if user.GetProxies().GetVless() != nil {
23 if vlessAccount, err := api.NewVlessAccount(user); err == nil {
24 settings.Vless = vlessAccount
25 }
26 }
27
28 if user.GetProxies().GetTrojan() != nil {
29 settings.Trojan = api.NewTrojanAccount(user)
30 }
31
32 if user.GetProxies().GetShadowsocks() != nil {
33 settings.Shadowsocks = api.NewShadowsocksTcpAccount(user)
34 settings.Shadowsocks2022 = api.NewShadowsocksAccount(user)
35 }
36
37 if user.GetProxies().GetHysteria() != nil {
38 settings.Hysteria = api.NewHysteriaAccount(user)
39 }
40
41 return settings, nil
42}
43
44func inboundFlow(inbound *Inbound) string {
45 if inbound == nil || inbound.Settings == nil {

Callers 3

buildInboundUpdatesMethod · 0.85
SyncUserMethod · 0.85

Calls 12

NewVmessAccountFunction · 0.92
NewVlessAccountFunction · 0.92
NewTrojanAccountFunction · 0.92
NewShadowsocksTcpAccountFunction · 0.92
NewShadowsocksAccountFunction · 0.92
NewHysteriaAccountFunction · 0.92
GetVmessMethod · 0.80
GetProxiesMethod · 0.80
GetVlessMethod · 0.80
GetTrojanMethod · 0.80
GetShadowsocksMethod · 0.80
GetHysteriaMethod · 0.80