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

Enable redirect for domains with dnslink in TXT record #44

Closed
5 tasks done
lidel opened this issue Jan 13, 2016 · 1 comment
Closed
5 tasks done

Enable redirect for domains with dnslink in TXT record #44

lidel opened this issue Jan 13, 2016 · 1 comment
Assignees
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Milestone

Comments

@lidel
Copy link
Member

lidel commented Jan 13, 2016

DNS query API is ready (ipfs/kubo#1054 (comment)) which means we could implement it as a part of #16 effort.

  • While user browses the web addon should query API regarding newly discovered hostnames and load site resources from IPFS if dnslink is present (and custom gateway redirect is enabled) – 037ea98
  • Initially it should be an experimental feature (disabled by default) – 037ea98
  • API responses should be cached in-memory for some time – 49a00cc
    • Note that we redirect to /ipns/ address and ignore dnslink path from DNS. Thanks to this, we can cache DNS responses for a long time.
      It is up to the gateway to get the latest version
  • Tests
  • Do not cache dnslink lookup when API is offline – 2c37516

Site with dnslink:

GET http://localhost:5001/api/v0/dns/ipfs.io

{"Path":"/ipfs/QmSrk8wCZ9oUgSCxJq4TXyJnPBYfoLDpKLGn7hLPNzauVX"}

Site without dnslink in TXT record:

GET http://localhost:5001/api/v0/dns/google.com:

{"Message":"could not resolve name.","Code":0}
@lidel lidel added the kind/enhancement A net-new feature or improvement to an existing feature label Jan 13, 2016
@lidel lidel added the help wanted Seeking public contribution on this issue label Jan 17, 2016
@lidel lidel mentioned this issue Jan 23, 2016
@lidel lidel added this to the v1.5.0 milestone Jan 27, 2016
lidel added a commit that referenced this issue Jan 31, 2016
- implements #44
- disabled by default
- still work in progress, performance is poor due to the lack
  of any dns cache
lidel added a commit that referenced this issue Feb 3, 2016
- implements #44
- simple map with automatic key expiration
- tests
@lidel lidel self-assigned this Feb 3, 2016
@lidel lidel removed the help wanted Seeking public contribution on this issue label Feb 3, 2016
@lidel
Copy link
Member Author

lidel commented Feb 4, 2016

Implemented (experimental, so disabled by default, can be enabled on the Preferences screen).

@lidel lidel closed this as completed Feb 4, 2016
lidel added a commit that referenced this issue Jan 10, 2017
- based on functionality from legacy-sdk branch (see issue #44)
- DNS lookups are stored in LRU Cache
- does not redirect on initial cache miss (room for improvement)
- disabled by default (in current form degrades browsing performance)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant