1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-04 16:37:12 -05:00
This commit is contained in:
v2ray 2016-04-24 22:54:41 +02:00
parent 9e1d0d8c5e
commit 6486891b18

View File

@ -62,7 +62,7 @@ func (this *Config) UnmarshalJSON(data []byte) error {
return err return err
} }
this.AllowedUsers = jsonConfig.Users this.AllowedUsers = jsonConfig.Users
this.Features = jsonConfig.Features this.Features = jsonConfig.Features // Backward compatibility
this.Defaults = jsonConfig.Defaults this.Defaults = jsonConfig.Defaults
if this.Defaults == nil { if this.Defaults == nil {
this.Defaults = &DefaultConfig{ this.Defaults = &DefaultConfig{
@ -70,6 +70,7 @@ func (this *Config) UnmarshalJSON(data []byte) error {
AlterIDs: 32, AlterIDs: 32,
} }
} }
// Backward compatibility
if this.Features != nil && this.DetourConfig == nil { if this.Features != nil && this.DetourConfig == nil {
this.DetourConfig = this.Features.Detour this.DetourConfig = this.Features.Detour
} }