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 on Opera Android does not load #174

Closed
benhylau opened this issue Dec 20, 2020 · 4 comments · Fixed by ipfs/kubo#7847
Closed

DNSLink on Opera Android does not load #174

benhylau opened this issue Dec 20, 2020 · 4 comments · Fixed by ipfs/kubo#7847
Labels
developers need/analysis Needs further analysis before proceeding topic/origin Issues related to Origin-based security

Comments

@benhylau
Copy link

benhylau commented Dec 20, 2020

Expectation

I expect DNSLink to resolve and load using ipns:// scheme on Opera Android.

Problem

For example, this link does not resolve:

ipns://api.staging.compost.digital/v0/monetization/balances.json

This resolves over:

This may be related to #169 but also seems to fail even before hitting that bug on Opera Android. It appears to not match it as a IPFS URL at all.

Note that I have been able to resolve other IPFS CID via ipfs:// in this browser.

Things I have tried

Changing the Opera Android gateway to a path-based one like https://ipfs.io in the crypto wallet setting of the app, but that didn't change anything. After speaking with @lidel in chat it appears Opera Android only allow subdomain gateways.

@benhylau benhylau added the need/triage Needs initial labeling and prioritization label Dec 20, 2020
@ipfs ipfs deleted a comment from welcome bot Dec 20, 2020
@lidel lidel added developers need/analysis Needs further analysis before proceeding topic/origin Issues related to Origin-based security and removed need/triage Needs initial labeling and prioritization labels Dec 20, 2020
@lidel
Copy link
Member

lidel commented Dec 20, 2020

Thank you for reporting this.
Opera for Android leverages subdomain gateway on https://dweb.link, which suggests that the source of the issue is related to #169.
We'll look into this, and if confirmed, ship a fix in go-ipfs in January, which will then get populated to public gateway at dweb.link

@benhylau
Copy link
Author

@lidel @aschmahmann I don't think this is fixed in Opera for Android.

ipns://en.wikipedia-on-ipfs.org/wiki/ in Opera Android

  • opens up https://en.wikipedia-on-ipfs.org/wiki/
  • instead of https://en-wikipedia--on--ipfs-org.ipns.dweb.link/wiki/

If you try to load ipns://staging.compost.digital, Opera tries to load it via HTTP and fails since the domain has no HTTP site at the moment. Opera is not handling IPNS with DNSLink regardless of #169.

@lidel
Copy link
Member

lidel commented Jan 16, 2021

@benhylau you are right.

Opera Mobile is loading canonical origin for DNSLink names, afaik they did that to work around TLS error until #169 was addressed.

I'm reopening this + will reach out to Opera asking to update their browser to leverage TLS-compatible DNSLink support at dweb.link (and soon all the other gateways).

Best practice for loading IPFS URI via a public gateway

TLDR: one can now load https://dweb.link/ipns/{dnslink-domain} and that will get redirected to a subdomain compatible with single level wildcart TLS certs (*.ipns.dweb.link in this case):

If user agent does not run own node and rely on a public gateway, it may be the best practice to simply delegate all CID conversion and subdomain creation to the router at dweb.link:

  • ipfs://cid/pathhttps://dweb.link/ipfs/cid/path → correct subdomain
  • ipns://example.com/pathhttps://dweb.link/ipns/example.com/path → correct subdomain

dweb.link also supports navigator.registerProtocolHandler (ipfs/kubo#7802), so one can simply encodeURIComponent('ipfs://cid/path') and pass it to go-ipfs directly:

  • ipfs://cid/pathhttps://dweb.link/ipfs/?uri=ipfs%3A%2F%2Fcid%2Fpath → ... → correct subdomain
  • ipns://example.com/pathhttps://dweb.link/ipns/?uri=ipns%3A%2F%2Fexample.com%2Fpath → ... → correct subdomain

@lidel lidel reopened this Jan 16, 2021
@benhylau
Copy link
Author

Opera fixed it right before we launched COMPOST :D
Try this in your Opera Android: ipns://one.compost.digital

@lidel lidel closed this as completed Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developers need/analysis Needs further analysis before proceeding topic/origin Issues related to Origin-based security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants