ipfs / ipfs/ipfs-companion

libdweb/protocol handler: fallback to public gateways if no node available

Open
#554 1 comment 1 reaction 0 assignees View on GitHub
area/libdweb status/blocked/missing-api status/deferred
Dominant language
JavaScript
Stars
2.2k
Forks
338
Avg merge
3m
Merged PRs (30d)
1

Description

### Summary

There should be an option to disable local IPFS node and run `ipfs://` and `ipns://` with a public gateway as a backend (#491) (or do that as an automatic fallback if no node is available).

### Rationale

Given protocol handler API from libdweb (https://github.com/ipfs-shipyard/ipfs-companion/pull/533) we are able to separate security perimeter from transport layer.

IPFS is content-addressed, trustless system. It means as long we verify hash of received payload matches we can use public gateways as a fallback transport. Due to this the feature should be enabled only for browsers with native protocol handler.

It would be a huge UX win for end user: `ipfs://` and `ipns://` would always work, even if the only transport allowed in local network is HTTP or user is concerned with battery/bandwidth use and just want to browse IPFS in light, read-only mode (#507).

When native protocol handler is available, read-only public gateway could be listed as an additional backend (#491).

### Additional Resources

- We have a semi-official list of public gateways donated by community:
https://github.com/ipfs/public-gateway-checker/blob/master/gateways.json
It could be used in round-robin fashion.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.