-
Notifications
You must be signed in to change notification settings - Fork 302
fix: remove final dot in relay urls when doing https requests #3487
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
base: main
Are you sure you want to change the base?
Conversation
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3487/docs/iroh/ Last updated: 2025-09-30T11:08:23Z |
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.
I'm kind of -0.5 on this.
- It's brittle because we need to remember where to use which representation of the URL. Your comment already has questions about having found every spot.
- #3486 already fixes this anyway.
- The original reason for the final dot still applies, why let reqwest do the extra DNS lookups?
From the investigation it sounded to melike that is not the case, the dot is removed by rustls at some point, so there seems to be no benefit in this case. |
@Frando correct me if I'm wrong, but I understood the dot is only removed to check whether the name on the certificate matches the dialed name. So that dot is left in-place for the dialing itself? |
closes #3377 |
Description
We append a final dot to all relay URL domains, to make sure that during DNS resolution the domain is treated as absolute, and no search suffix is appended. However, in the context of TLS name verification it is more correct to not have a final dot, so that the URL's hostname matches the name in the certificate. It seems this is not an issue with rustls, but when using openssl this is an issue (which we had reports for, but those are also fixed by #3486).
This PR adds methods to get the relay URL or hostname without the final dot, and uses those in the context of HTTPS requests.
Breaking Changes
Notes & open questions
Should check if there's more uses of those URLs. Likely we want to do the same when actually connecting to the relay? But didn't yet find the perfect spot for that.
Change checklist
quic-rpc
iroh-gossip
iroh-blobs
dumbpipe
sendme