1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00
This commit is contained in:
RPRX 2020-11-02 11:00:08 +00:00 committed by GitHub
parent b0dfaa83eb
commit 21739e6f38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View File

@ -67,9 +67,6 @@ type VMessDefaultConfig struct {
func (c *VMessDefaultConfig) Build() *inbound.DefaultConfig { func (c *VMessDefaultConfig) Build() *inbound.DefaultConfig {
config := new(inbound.DefaultConfig) config := new(inbound.DefaultConfig)
config.AlterId = uint32(c.AlterIDs) config.AlterId = uint32(c.AlterIDs)
if config.AlterId == 0 {
config.AlterId = 32
}
config.Level = uint32(c.Level) config.Level = uint32(c.Level)
return config return config
} }

View File

@ -5,10 +5,7 @@ package inbound
// GetDefaultValue returns default settings of DefaultConfig. // GetDefaultValue returns default settings of DefaultConfig.
func (c *Config) GetDefaultValue() *DefaultConfig { func (c *Config) GetDefaultValue() *DefaultConfig {
if c.GetDefault() == nil { if c.GetDefault() == nil {
return &DefaultConfig{ return &DefaultConfig{}
AlterId: 32,
Level: 0,
}
} }
return c.Default return c.Default
} }