-
Notifications
You must be signed in to change notification settings - Fork 29
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
Hostnames for localhost HTTP gateway #109
Comments
Candidate:
|
There are some occult tricks for browsers on mac and windows; you can do some automagic with this https://en.wikipedia.org/wiki/Proxy_auto-config I found it via https://github.com/KishanBagaria/frwrd |
Changing proxy setting globally is not a good idea, however Firefox provides browser.proxy API with a very interesting property:
This would enable us to use PAC-like processing only for IPFS requests. |
Seems like that it also depends on From
|
I think switching from Having local gateway at For now, this can be enabled manually via: $ ipfs config --json Addresses.Gateway '["/ip4/127.0.0.1/tcp/8080","/ip6/::1/tcp/8080"]' A proposal to extend default |
Update: there may be a way to support |
Notes on Secure Context and |
The ".dweb" Special-Use Domain Name: arewedistributedyet/arewedistributedyet#34 |
Interesting development: Caveat: Firefox does not include subdomains ( There is also a discussion to skip DNS lookup for This makes DemoLoaded http://en.wikipedia-on-ipfs.org.ipfs.localhost:8080/ipns/en.wikipedia-on-ipfs.org/wiki/ today and Chrome marks it as secure context:
|
Quick update (in the context of https://github.com/ipfs/go-ipfs/issues/7527): Since go-ipfs 0.5, when user runs local IPFS node, they can load websites and content via subdomains like this: http://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq.ipfs.localhost:8080/wiki/ There are two known problems with
Implementing "let localhost be localhost" (6.3.3 from rfc6761) would ensure localhost can resolve on every platform and can be marked as secure context – very likely solving both issues. Vendors are mostly ok with this change:
Unfortunately the movement on Safari and Firefox fronts to resolve it turned out to be slower than we expected. Looking into ways we can accelerate that. |
Good news: Chromium officially locked Details from https://bugs.chromium.org/p/chromium/issues/detail?id=589141#c15:
This increases likelihood of other vendors to follow. |
merges to mozilla-central - can't trust them until 24hrs old ;) |
Some updates and reading for anyone interested in following The best support can be found in Chromium (no need for HTTP proxy, local DNS resolver is ignored)
|
I get this error: I can access it from chrome but not my Golang program:
|
This was resolved in ipfs/kubo#6096 We went with
|
Motivation
fuglyless than prettyhttp://docs.ipfs.io
to a local go-ipfs gateway athttp://127.0.0.1:8080/ipns/docs.ipfs.io/
Requirements
I wonder if there is a way of generating vanity hostnames pointing at localhost that:
/ipfs/{cid}
is redirected from public gateway running on https to a custom one running on httpthis may be the blocker: AFAIK only127.0.0.1
and::1
are whitelisted by browser vendors (eg. firefox #903966) butlocalhost
is not (that is why Companion uses raw IP)localhost
is a secure context in both Firefox and Chrome. Firefox does not support subdomains (foo.bar.localhost
is not a secure context)If anyone has unconventional ideas, feel free to comment.
Candidates
*.localhost
Current status
🔒 –
window.isSecureContext === true
💢 –
window.isSecureContext === false
127.0.0.1
localhost
foo.bar.localhost
References
http://localhost
as a secure contextThe text was updated successfully, but these errors were encountered: