mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-01 01:44:15 +00:00
Config: Remove some legacy fields from V2Ray 3.x era (#3776)
https://github.com/XTLS/Xray-core/pull/3776#issue-2512316726
This commit is contained in:
parent
9438517130
commit
f04cb0b288
6 changed files with 54 additions and 176 deletions
|
@ -57,10 +57,6 @@ func (c *VMessDetourConfig) Build() *inbound.DetourConfig {
|
|||
}
|
||||
}
|
||||
|
||||
type FeaturesConfig struct {
|
||||
Detour *VMessDetourConfig `json:"detour"`
|
||||
}
|
||||
|
||||
type VMessDefaultConfig struct {
|
||||
Level byte `json:"level"`
|
||||
}
|
||||
|
@ -74,7 +70,6 @@ func (c *VMessDefaultConfig) Build() *inbound.DefaultConfig {
|
|||
|
||||
type VMessInboundConfig struct {
|
||||
Users []json.RawMessage `json:"clients"`
|
||||
Features *FeaturesConfig `json:"features"`
|
||||
Defaults *VMessDefaultConfig `json:"default"`
|
||||
DetourConfig *VMessDetourConfig `json:"detour"`
|
||||
}
|
||||
|
@ -89,8 +84,6 @@ func (c *VMessInboundConfig) Build() (proto.Message, error) {
|
|||
|
||||
if c.DetourConfig != nil {
|
||||
config.Detour = c.DetourConfig.Build()
|
||||
} else if c.Features != nil && c.Features.Detour != nil {
|
||||
config.Detour = c.Features.Detour.Build()
|
||||
}
|
||||
|
||||
config.User = make([]*protocol.User, len(c.Users))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue