This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
Act as HTTP PROXY for http://<cidv1b32>.ipfs.localhost #1877
Labels
effort/days
Estimated to take multiple days, but less than a week
exp/wizard
Extensive knowledge (implications, ramifications) required
kind/enhancement
A net-new feature or improvement to an existing feature
kind/wontfix
P1
High: Likely tackled by core team if no one steps up
Problem
CID-in-subdomain creates Origin-based isolation if website is loaded from public gateway:
..however we continue to have a single Origin for all websites loaded from local gateway:
This means use of local gateway decreases some of security guarantees web developers are used to, and removes some incentives to run local go-ipfs (and redirect to it via ipfs-companion).
Solution
What if js-ipfs could act as HTTP PROXY for requests made to
http://*.ipfs.*/
andhttp://*.ipns.*/
?Having that, IPFS Companion could automatically set Gateway port as PROXY for requests to
http://*.ipfs.localhost
, which would create very nice URLs for local gateway, solving the Origin problem for local go-ipfs 👌Initial look at technical feasibility
See ipfs/kubo#5982 for notes on language-agnostic protocol details.
I did not look into js-ipfs nuances yet (such as how to make it work with Hapi.js)
Would love to hear ideas in comments below.
Rationale for doing this in JS IPFS
This would not only be used in
jsipfs daemon
running in Node, but also in Brave and other browsers that allow ipfs-companion access to chrome.sockets.* APIs (or similar).cc #1440, https://github.com/ipfs/ipfs/issues/337, ipfs/in-web-browsers#89, ipfs/ipfs-companion#667, ipfs/in-web-browsers#109, brave/brave-browser#819
The text was updated successfully, but these errors were encountered: