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:
Kobe Arthur Scofield 2024-09-09 14:03:21 +08:00 committed by GitHub
parent 9438517130
commit f04cb0b288
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 54 additions and 176 deletions

View file

@ -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))