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

Known DNSLink and IPNS should work in airplane mode #8245

Open
lidel opened this issue Jul 5, 2021 · 1 comment
Open

Known DNSLink and IPNS should work in airplane mode #8245

lidel opened this issue Jul 5, 2021 · 1 comment
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization topic/gateway Topic gateway topic/ipns Topic ipns

Comments

@lidel
Copy link
Member

lidel commented Jul 5, 2021

When the user unplugs internet connection, previously visited DNSLink websites with low TXT record TTL will return error:

ipfs resolve -r /ipns/en.wikipedia-on-ipfs.org: could not resolve name

This is unfortunate, because the user's node has all the data required for loading the website.
Vendors like Brave should be able to load previously visited websites in offline mode using last-known DNSLink.

Improvement proposal

Update https://github.com/ipfs/go-namesys to:

  • keep a separate fallback cache of known DNSLinks and IPNS records
  • when record refresh fails (TTL expired + unable to reach DNS server) return last-known value from the fallback cache

This way the user can load ipns://en.wikipedia-on-ipfs.org (Brave) or http://en.wikipedia-on-ipfs.org.ipns.localhost:8080 (local gateway) even when in airplane mode.

Open question: is this a good default for all use cases? If not, we could add NoNamesysRecoveryCache configuration option to Gateway to allow override of default behavior and force hard record expiration based on TTL and require DNS/IPNS lookup to always succeed.

@lidel lidel added kind/bug A bug in existing code (including security flaws) topic/ipns Topic ipns topic/gateway Topic gateway need/triage Needs initial labeling and prioritization labels Jul 5, 2021
@lidel lidel changed the title DNSLink robustness: memory for offline use cases Known DNSLink and IPNS should work in airplane mode Jul 5, 2021
@lidel lidel mentioned this issue Nov 10, 2021
12 tasks
@lidel
Copy link
Member Author

lidel commented Feb 18, 2023

Note to self, or someone who wants to work on this:

We are adding https://github.com/rs/dnscache in ipfs/bifrost-gateway#46, the same thing could be added to namesys for DNSLinks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization topic/gateway Topic gateway topic/ipns Topic ipns
Projects
None yet
Development

No branches or pull requests

2 participants
@lidel and others