-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add IPv4-only HTTP client #34
Conversation
Pull Request Test Coverage Report for Build 10510110774Details
💛 - Coveralls |
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.
Would it be preferable overall to make ipv4= parameter required? If we eliminated the fallback in the server then clients would have to specify the address at registration time, and the http connection could use v4 or v6.
Reviewable status: 0 of 1 approvals obtained
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.
After discussing this on Slack, do you think it's worth keeping the ipv4 discovery?
Reviewable status: 0 of 1 approvals obtained
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, I think so. Now I'm wondering if it's a mistake to have the ipv4= parameter! :)
Reviewable status: complete! 1 of 1 approvals obtained
It would help in handling the case where the server has multiple interfaces/addresses, and the host wants to serve ndt-server on a specific one (which may not be the default route). |
This replaces the default HTTP client from the
http
package with a client that will always connect over IPv4.The main reason behind this change is that the Autojoin API currently tries to autodetect the node's IPv4 by reading the HTTP request's client IP. On dual-stack machines, the request could randomly happen over IPv6 and the Autojoin API wouldn't have the minimum information required to register the node. This change mitigates that problem.
This change is