mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-06-30 02:55:23 +00:00
added special handling for none security
This commit is contained in:
parent
4ba76099e4
commit
8609a59322
|
@ -31,6 +31,7 @@ func (s StreamConfig) BuildV5(ctx context.Context) (proto.Message, error) {
|
||||||
Settings: serial.ToTypedMessage(transportConfigPack),
|
Settings: serial.ToTypedMessage(transportConfigPack),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if s.Security != "none" && s.Security != "" {
|
||||||
if s.SecuritySettings == nil {
|
if s.SecuritySettings == nil {
|
||||||
s.SecuritySettings = []byte("{}")
|
s.SecuritySettings = []byte("{}")
|
||||||
}
|
}
|
||||||
|
@ -40,6 +41,7 @@ func (s StreamConfig) BuildV5(ctx context.Context) (proto.Message, error) {
|
||||||
}
|
}
|
||||||
config.SecurityType = s.Security
|
config.SecurityType = s.Security
|
||||||
config.SecuritySettings = append(config.SecuritySettings, serial.ToTypedMessage(securityConfigPack))
|
config.SecuritySettings = append(config.SecuritySettings, serial.ToTypedMessage(securityConfigPack))
|
||||||
|
}
|
||||||
|
|
||||||
config.SocketSettings, err = s.SocketSettings.Build()
|
config.SocketSettings, err = s.SocketSettings.Build()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user