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

Function accountForAPI

backend/xray/user.go:52–66  ·  view source on GitHub ↗
(inbound *Inbound, account api.Account)

Source from the content-addressed store, hash-verified

50}
51
52func accountForAPI(inbound *Inbound, account api.Account) api.Account {
53 vlessAccount, ok := account.(*api.VlessAccount)
54 if !ok {
55 return account
56 }
57
58 overrideFlow := inboundFlow(inbound)
59 if overrideFlow == "" {
60 return account
61 }
62
63 copy := *vlessAccount
64 copy.Flow = overrideFlow
65 return &copy
66}
67
68func checkShadowsocks2022(method string, account api.ShadowsocksAccount) api.ShadowsocksAccount {
69 account.Password = common.EnsureBase64Password(account.Password, method)

Calls 1

inboundFlowFunction · 0.85