-
Notifications
You must be signed in to change notification settings - Fork 381
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
Implement dual-stack support #861
base: master
Are you sure you want to change the base?
Conversation
Please fix the CI issues |
91ebe3f
to
1cc0a30
Compare
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.
Some hosts will have ipv6 disabled, and creating an ipv6 socket will fail, the IPV6 specifics needs to be wrapped with an OSError check with fall back to IPv4.
1cc0a30
to
4529903
Compare
The socket will now fall back to IPv4, for systems that are misconfigured to have IPv6 disabled ;) |
By using an INET6 socket with IPV6_V6ONLY disabled, legacy IPv4 can still be reached. To connect to v4 IPs, the addresses are mapped to IPv6. IPv6 addresses are only used when a hostname resolves to one and the system has a non-local IPv6 available. For hosts with IPv6 completely disabled for some reason, the socket falls back to v4-only.
0df6d2a
to
4f06028
Compare
@DerEnderKeks please don't amend your previous commit when making changes, it makes it hard to review |
Alright (although I always consider it an unnessacary loss of information when you squash PRs into a single commit). |
Is there any need/benefit of the new happy eyeball stuff you working on @bdraco |
All of that work is for asyncio so it wouldn’t apply here |
This PR adds support for IPv6 and thus dual-stack. It contains two changes:
Unsetting theHost
header when requesting the/setup/eureka_info
endpoint, as I noticed that my NVIDIA Shield blocks any request (empty body with status code 403) when a domain is set in the header, at least when requesting via IPv6.Let me know if I overlooked anything, but the Youtube example now works fine with both, IPv4 and IPv6.