1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 01:57:12 -05:00

Fix: guard against nil pointer dereference of (*NetworkList)

This commit is contained in:
Huang-Huang Bao 2022-08-20 22:18:03 +08:00 committed by Xiaokang Wang (Shelikhoo)
parent 6fcdf998f1
commit ddc6312c5d
3 changed files with 3 additions and 3 deletions

View File

@ -239,7 +239,7 @@ func init() {
}
rule.Domain = v.Domain
rule.GeoDomain = v.GeoDomain
rule.Networks = v.Networks.Network
rule.Networks = v.Networks.GetNetwork()
rule.Protocol = v.Protocol
rule.Attributes = v.Attributes
rule.UserEmail = v.UserEmail

View File

@ -71,7 +71,7 @@ func (d *Door) Network() []net.Network {
return d.config.Networks
}
return d.config.NetworkList.Network
return d.config.NetworkList.GetNetwork()
}
func (d *Door) policy() policy.Session {

View File

@ -19,7 +19,7 @@ func init() {
CipherType: simplifiedServer.Method,
}),
},
Network: simplifiedServer.Networks.Network,
Network: simplifiedServer.Networks.GetNetwork(),
PacketEncoding: simplifiedServer.PacketEncoding,
}