-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block non-local connections on mdns server #109
Conversation
For this to be merged I think we need a way to test it. |
Yeah, that's a hard thing to write a test for, and in a way duplicates bogon's tests. I think ensuring this works as expected is something that would be covered by an integration test suite (that doesn't exist yet and would take some effort to set up) so would be best to make an issue for making that test suite and referencing this pull request as one of the needed tests. |
@tomasciccola Approved with the small caveat that bogon should be in package.json dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, testing is hard for this. One way forward is to set up a virtual network with mininet, but that would be a lot of work. I think it's ok to merge without tests for now, and we should ensure that we do manual integration tests for this (e.g. actually testing on real devices) at some point when the apps are ready.
additionally, socket.remoteAddress returns an IPv6 - that embebs an IPv4- , so we need to strip the :ffff:: since it would give a false positive
It looks like we're now good to merge this. |
nop, I need to address this yet ->
|
It seems that ports are assigned by the OS since we are not passing them explicitly. This means that if I do smth like |
I wrapped const = promisify(this.#tcp?.listen)
await listen(0,'0.0.0.0') Another issue is that in a promise Additionally, the |
With this last commit, you would still get an error because server.address() could be null (if the listen() fails) |
Based on a previous pr (#112) and some upcoming changes it looks like we can close this one. Feel free to reopen if I've got that wrong. |
This should close #68 and #69