mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-14 08:15:55 -05:00
Crash process when encountered when unknown security settings type was supplied
This commit is contained in:
parent
e4188c8604
commit
3631053c2b
@ -278,9 +278,11 @@ func ConfigFromStreamSettings(settings *internet.MemoryStreamConfig) *Config {
|
||||
if settings == nil {
|
||||
return nil
|
||||
}
|
||||
config, ok := settings.SecuritySettings.(*Config)
|
||||
if !ok {
|
||||
if settings.SecuritySettings == nil {
|
||||
return nil
|
||||
}
|
||||
// Fail close for unknown TLS settings type.
|
||||
// For TLS Clients, Security Engine should be used, instead of this.
|
||||
config := settings.SecuritySettings.(*Config)
|
||||
return config
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user