mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-08-25 16:05:31 +00:00
feat: add option to set default flow.
This commit is contained in:
parent
f557bf7da4
commit
e8ba8dc2cb
@ -32,6 +32,7 @@ type VLessInboundConfig struct {
|
|||||||
Clients []json.RawMessage `json:"clients"`
|
Clients []json.RawMessage `json:"clients"`
|
||||||
Decryption string `json:"decryption"`
|
Decryption string `json:"decryption"`
|
||||||
Fallbacks []*VLessInboundFallback `json:"fallbacks"`
|
Fallbacks []*VLessInboundFallback `json:"fallbacks"`
|
||||||
|
DefaultFlow string `json:"defaultFlow"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build implements Buildable
|
// Build implements Buildable
|
||||||
@ -55,7 +56,9 @@ func (c *VLessInboundConfig) Build() (proto.Message, error) {
|
|||||||
account.Id = u.String()
|
account.Id = u.String()
|
||||||
|
|
||||||
switch account.Flow {
|
switch account.Flow {
|
||||||
case "", vless.XRV:
|
case "":
|
||||||
|
account.Flow = c.DefaultFlow
|
||||||
|
case vless.XRV:
|
||||||
default:
|
default:
|
||||||
return nil, errors.New(`VLESS clients: "flow" doesn't support "` + account.Flow + `" in this version`)
|
return nil, errors.New(`VLESS clients: "flow" doesn't support "` + account.Flow + `" in this version`)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user