-
Notifications
You must be signed in to change notification settings - Fork 95
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
How to bind all interfaces dual-stack? #140
Comments
One approach I'm considering is to use a value other than But as I consider that, I realize the issue is broader. What if one specifies "::1" or relies on the default fallback - that binding also will be IPv6 only. I'd really like to be able to bind to all interfaces in a dual-stack way. |
I do see that one may pass |
Also, binding to Another solution I'm considering is for aiosmtpd to present a constant:
And use that in the example server to draw attention to it. |
Aha! I just noticed that |
I've presented a PR, and that approach feels minimally invasive to address the concern. |
I think we can label this issue "rubber ducking" :-) Thanks for the PR and for figuring this out! |
* Add docstring to Controller, explaining how to use it to bind dual-stack (local or all interfaces). Fixes #140. * Move the documentation to the published docs. For inline docs, reference the published docs. * Add link to Wikipedia's description of dual-stack for easy context. * Disable the (broken) IPv6 in Travis. Ref travis-ci/travis-ci#8711
I wish to write a server application that binds to all interfaces in a dual-stack IPv4/IPv6 environment.
I thought the example server would be doing that, as it appears to bind to '::0'. In other applications, like CherryPy, binding to that address makes the server available on all interfaces, IPv4 and IPv6, but in aiosmtpd, the server is only reachable on IPv6. As a result, when the application moves to an environment that only supports IPv4 (looking at you, Docker), the application is unreachable.
Reading up on the docs for create_server, I see that passing a
None
value for the host should bind to all interfaces on both stacks, and indeed, that's the behavior I see.But aiosmtpd doesn't allow passing
None
due to the the localhost default behavior.I did find one interface that worked, but I'm not happy with it:
The text was updated successfully, but these errors were encountered: