Skip to content
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

DNSLink fallback to gateway #115

Merged
merged 1 commit into from
Sep 5, 2024
Merged

DNSLink fallback to gateway #115

merged 1 commit into from
Sep 5, 2024

Conversation

John-LittleBearLabs
Copy link
Collaborator

@John-LittleBearLabs John-LittleBearLabs commented Aug 20, 2024

Has to be turned-off-able through preferences (it is), because of the security implications.

If the DNS TXT request/path fails for one reason or another, then request IPFS gateways resolve the name for you. There's actually a few reasons why this could be helpful:

  1. Your system's DNS setup (e.g. resolv.conf) isn't quite reproducible by Chromium so it gave up on reproducing it before it got to DNSClient. None of the other DNS providers inside Chromium support TXT requests.
  2. DNS in general where you are might be botched in some weird way. It pretty much has to be a weird way, because it can still reach the gateways.
  3. Coincidentally solves the ENS support ticket - one of the first tickets added by not-me. You can't fetch TXT records for a .eth domain through normal DNS, but many gateways do support such a resolver.

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.34%. Comparing base (cf03085) to head (4d2d777).

Additional details and impacted files
@@              Coverage Diff              @@
##           regscheme     #115      +/-   ##
=============================================
+ Coverage      50.31%   50.34%   +0.03%     
=============================================
  Files            477      477              
  Lines          16093    16145      +52     
  Branches        1750     1755       +5     
=============================================
+ Hits            8097     8129      +32     
- Misses          7440     7459      +19     
- Partials         556      557       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@John-LittleBearLabs
Copy link
Collaborator Author

Ignore chromium_edits/ here. The most important changes are in gateway_request.cc , multi_gateway_requestor.cc , and dnslink_requestor.cc . Some stuff in Client and preferences.cc as well, but borderline trivial.

@John-LittleBearLabs John-LittleBearLabs changed the base branch from regscheme to main September 4, 2024 15:37
When DNS text fails.
No DNSClient?

Coincidentally also Fixes #28
@John-LittleBearLabs John-LittleBearLabs merged commit 69fbf44 into main Sep 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants