ipfs / service-worker-gateway

[WIP EXPERIMENT] IPFS Gateway implemented in Service Worker
https://inbrowser.dev
Other
17 stars 8 forks source link

Config option for direct retrievals #267

Open aschmahmann opened 1 month ago

aschmahmann commented 1 month ago

The latest version enables direct retrieval from peers by default. This code path does a number of things that enable more work and complexity such as:

While this is where we'd like to get to it'd be great to separately be able to debug the recursive-gateway vs direct retrieval cases and only switch on by default the features we're confident are going to work for most people (in this case recursive-gateways). This means this it'd be helpful to have an option in the config file to enable direct-retrievals that's currently off by default

2color commented 1 month ago

Yeah this would be useful.

Relevant code lines for this:

  • Connecting to these peers (and if libp2p peers) managing the connections

One thing to note here is that only HTTP retrieval is enabled by default. Verified Fetch uses @helia/http by default. So while the delegated routing is called, it only acts on "transport-ipfs-gateway-http" responses.