-
Notifications
You must be signed in to change notification settings - Fork 217
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
Changes to server to allow better control over binding to interfaces #582
Conversation
Hi, thanks for sharing your work on this. The proposed changes seem like they might be useful for someone, but I can't recall anyone ever asking for such features. Have you come across a use case for these changes that justify adding to the complexity of the server code? |
Like I said in 0123325, when I start the server with IPv6 disabled in the OS, it outputs an error: Couldn't listen on :::8999: [Errno 97] Address family not supported by protocol. This isn't an issue, since it seems to just ignore IPv6 after that, at least on this version, who knows what happens in future versions. Keeping the setup as minimal as possible helps with avoiding trouble in the future. Some people have a VPN setup and want to host through it, in that case for privacy/security reasons it makes sense to listen only to the VPN interface. It doesn't really complicate the code that much and I don't see a reason for not having the options. Lots of applications allow you to do this. It's a small change allowing lots of flexibility. |
It looks like a good feature to me. One thing I'd put to consider is whether having options like |
Yeah I was considering that initially, but just went with the more "minimal" approach.
Now when I think about it, this way we don't have to rely on the rest of the code to handle no binding to any interface, it's more explicit.
This seems even better. It can be something like I can rebase the commit depending on what you feel would be the best approach, but I like the last one most so far. |
@powerjungle I've discussed the matter with @daniel-123 and @albertosottile and we've decided that using |
On some setups, IPv6 or IPv4 might be disabled in the OS. In my case IPv6 is disabled and this causes errors when starting the server.
Sometimes a user might want to bind to localhost only for testing or have multiple interfaces per IP version and only one must be used.
fe758de
to
534f7f2
Compare
One issue that I found is, when setting a single invalid IP using syncplay/syncplay/ep_server.py Line 52 in e1bcf12
It will not report that it wasn't able to listen to IPv6 when it's disabled system-wide as well. |
Thanks for the heads up on those potential issues, which should be helpful for those wanting to track down issues if they occur in the future. I do not consider those to be blocking problems and so will be accepting this PR. |
No description provided.