-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat: support DNSLink on non-ICANN DNS names #8071
Conversation
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.
Thank you @mycorrhizas!
I think we need to make this smarter and replace IsDomainName
with a helper function that uses IsDomainName
internally, but first correctly detects valid PeerID and returns "false" before calling IsDomainName
.
Otherwise, we get false-positives when a valid PeerID is used in subdomain (thats why your test did not pass).
Samples you can use for testing:
QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD
(legacy peerid multihash in base58btc)12D3KooWFB51PRY9BxcXSH6khFXw1BZeszeLDy7C8GciskqCTZn5
(new peerid multihash in base58btc)k2k4r8l9ja7hkzynavdqup76ou46tnvuaqegbd04a4o1mpbsey0meucb
(new peerid as CIDv1 in base36)
lmk if anything is unclear
Ok, things got a bit more complicated because we have various PRs in flight, all related to DNS and DNSLink. I think we need to wait for:
I'll refactor this PR to be ready for them. |
@lidel apologies for the late reply thanks for explaining and resolving the issue with |
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.
LGTM, but as I did some work here this needs more eyes.
@aschmahmann as noted during today's triage, this is ready for your final 👀
FYSA ipfs/go-namesys#13 already landed in namesys, so this is the final piece of the puzzle.
We may want to merge this AFTER #8068 as it should be easier to rebase this one if needed, than the other way around.
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.
LGTM, we'll merge after the DoH PR
This ensures we exclude valid PeerIDs from code paths that require DNSLink names. Ref. #8071 (review)
This ensures we exclude valid PeerIDs from code paths that require DNSLink names. Ref. ipfs/kubo#8071 (review) This commit was moved from ipfs/kubo@28d4d9b
Closes #8060
I switched
IsDomain()
fromjbenet/go-is-domain
toIsDomainName
fromgithub.com/miekg/dns
as suggested.I had to change one of the tests for everything to pass. This may be an error on my side. However, I could not understand why
http://k51qzi5uqu5di608geewp3nqkg0bpujoasmka7ftkyxgcm3fh1aroup0gsdrna.ipns.localhost/
was expected?