1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 17:46:58 -05:00

return error on listening domain address

This commit is contained in:
Darien Raymond 2019-01-19 10:59:47 +01:00
parent 9a7177c82c
commit aa4ab7fa03
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -40,6 +40,10 @@ func ListenTCP(ctx context.Context, address net.Address, port net.Port, settings
address = net.LocalHostIP
}
if address.Family().IsDomain() {
return nil, newError("domain address is not allowed for listening: ", address.Domain())
}
protocol := settings.ProtocolName
listenFunc := transportListenerCache[protocol]
if listenFunc == nil {