Skip to content

Retain ipfs:// when localhost gateway is used #974

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

Closed
markg85 opened this issue Jan 27, 2021 · 7 comments
Closed

Retain ipfs:// when localhost gateway is used #974

markg85 opened this issue Jan 27, 2021 · 7 comments
Labels
area/brave Issues related to Brave Browser status/blocked/upstream-bug Blocked by upstream bugs

Comments

@markg85
Copy link

markg85 commented Jan 27, 2021

Hi,

I'm not quite sure if this is a bug or a feature. Or perhaps even well intentional but i don't understand it.

I'm running ipfs companion on the latest fancy brave (with IPFS):
Version 1.19.86 Chromium: 88.0.4324.96 (Official Build) unknown (64-bit)

Now any IPFS site i visit gets this appended to the URL:
ipns.localhost:8080

I'm fine with that if i'm using http:// or https:// and that clearly shows i'm using a gateway. A local one in this case.
In this very specific case i'm visiting (as in typing in the url bar):
ipns://dnslink.io

Which gets rewritten to:
http://dnslink.io.ipns.localhost:8080/

This makes no sense to me.
I'm specifically using the ipfs protocol so i'm expecting it not to be rewritten to the http protocol.

Am i just missing a checkbox somewhere that would fix this?
Or is this a bug? Or an intentional feature?

Best regards,
Mark

@markg85 markg85 added the need/triage Needs initial labeling and prioritization label Jan 27, 2021
@ipfs ipfs deleted a comment from welcome bot Jan 27, 2021
@lidel
Copy link
Member

lidel commented Jan 27, 2021

Thank you for reporting this @markg85, this needs to be fixed in Brave (Companion does not control how address bar renders things).
Good news is that is already on the TODO list, we track it at brave/brave-browser#13756

@lidel lidel added area/brave Issues related to Brave Browser status/blocked/upstream-bug Blocked by upstream bugs and removed need/triage Needs initial labeling and prioritization labels Jan 27, 2021
@lidel lidel changed the title Don't rewrite url if protocol is ipfs/ipns Retain ipfs:// when localhost gateway is used Jan 27, 2021
@markg85
Copy link
Author

markg85 commented Jan 27, 2021

That is a better title indeed :) Thank you!

But i don't get why it's a Brave thing.
I'm also running chrome with ipfs companion and the exact same thing happens there.

I mean, somehow it does know how to resolve the site ipns://dnslink.io (ipfs companion magic i assume) but does redirect it to http://dnslink.io.ipns.localhost:8080/

@bbondy
Copy link
Contributor

bbondy commented Feb 1, 2021

@markg85 can you explain how to reproduce?
For me if I have a gateway configured in settings it goes to: https://dnslink-io.ipns.dweb.link/ which is expected.

Maybe a screenshot of your brave://settings/extensions please? Thanks!

@markg85
Copy link
Author

markg85 commented Feb 1, 2021

For me if I have a gateway configured in settings it goes to: https://dnslink-io.ipns.dweb.link/ which is expected.

That is exactly the problem.
If i type in the urlbar ipns://dnslink.io and have a local gateway running then i expect the site to stay on that very site. The urlbar should stay at "ipns://dnslink.io" and not rewrite/redirect to the http link.

Btw. It's awesome that Brave now natively supports IPFS. Thank you for that, @bbondy!

@lidel
Copy link
Member

lidel commented Feb 3, 2021

As this is Brave-specific behavior independent from Companion,
let's move to: brave/brave-browser#13872

@lidel lidel closed this as completed Feb 3, 2021
@bbondy
Copy link
Contributor

bbondy commented Feb 3, 2021

You might have this option on from brave://settings/extensions:
Screen Shot 2021-02-03 at 3 38 39 PM

@bbondy
Copy link
Contributor

bbondy commented Feb 3, 2021

it'll retain the ipns:// URI with the issue that @lidel mentioned though, as long as the configured gateway is localhost and matching your setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/brave Issues related to Brave Browser status/blocked/upstream-bug Blocked by upstream bugs
Projects
None yet
Development

No branches or pull requests

3 participants