mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
Crash process when encountered when unknown security settings type was supplied
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user