Skip to content
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

Closed
lidel opened this issue Feb 13, 2019 · 1 comment
Closed

Act as HTTP PROXY for http://<cidv1b32>.ipfs.localhost #1877

lidel opened this issue Feb 13, 2019 · 1 comment
Assignees
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

Comments

@lidel
Copy link
Member

lidel commented Feb 13, 2019

This is the same feature as ipfs/kubo#5982 (see detailed description and discussion there first)

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.*/ and http://*.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

@lidel lidel mentioned this issue Apr 6, 2020
2 tasks
@lidel lidel self-assigned this Apr 6, 2020
@hugomrdias hugomrdias added exp/wizard Extensive knowledge (implications, ramifications) required effort/days Estimated to take multiple days, but less than a week kind/enhancement A net-new feature or improvement to an existing feature P1 High: Likely tackled by core team if no one steps up labels May 21, 2020
@SgtPooki SgtPooki self-assigned this May 17, 2023
@SgtPooki SgtPooki moved this to 🥞 Todo in js-ipfs deprecation May 17, 2023
@SgtPooki
Copy link
Member

js-ipfs is being deprecated in favor of Helia. You can learn more about this deprecation and read the migration guide.

Please feel to reopen with any comments by 2023-06-02. We will do a final pass on reopened issues afterwards (see #4336).

I believe this is something that we're pointing users to ipfs-companion for. Please let us know if there's something needed in Helia.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants