mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-07-06 19:58:47 +00:00
Config: Rename inbounds' clients/accounts to users (#6083)
https://github.com/XTLS/Xray-core/pull/6055#issuecomment-4363896372 https://github.com/XTLS/Xray-core/pull/6082#issuecomment-4384523482
This commit is contained in:
+5
-1
@@ -59,7 +59,8 @@ func (c *VMessDefaultConfig) Build() *inbound.DefaultConfig {
|
||||
}
|
||||
|
||||
type VMessInboundConfig struct {
|
||||
Users []json.RawMessage `json:"clients"`
|
||||
Users []json.RawMessage `json:"users"`
|
||||
Clients []json.RawMessage `json:"clients"`
|
||||
Defaults *VMessDefaultConfig `json:"default"`
|
||||
}
|
||||
|
||||
@@ -73,6 +74,9 @@ func (c *VMessInboundConfig) Build() (proto.Message, error) {
|
||||
config.Default = c.Defaults.Build()
|
||||
}
|
||||
|
||||
if c.Clients != nil {
|
||||
c.Users = c.Clients
|
||||
}
|
||||
config.User = make([]*protocol.User, len(c.Users))
|
||||
processUser := func(idx int) error {
|
||||
rawData := c.Users[idx]
|
||||
|
||||
Reference in New Issue
Block a user