Closed gmaclennan closed 1 year ago
I was wondering how can we test this. Should we have a publicly accessible node that does mdns and connects to a predefined topic, so we can reject it on a test? Or is there already a mdns testnet that we can use?
This should be fixed in the latest implementation
We create a tcp server for listening to mdns connections, but theoretically this could receive connections from outside the local network. We should reject/block incoming connections from non-local addresses. We can maybe do this by checking
socket.remoteAddress
against private IP ranges with something like https://github.com/mafintosh/bogon The reason for doing this is a security precaution, particularly if we are sending invites to peers discovered through mdns, and we want to be sure that incoming connections are local network only.