Skip to content

Serve Trustless IPFS HTTP Gateway API via libp2p (experimental) #10049

@aschmahmann

Description

@aschmahmann

Description

The trustless gateway specification allows retrieval of blocks and certain types of DAGs over HTTP.

Some tooling has already been built that leverages the trustless gateway API to move data around (https://github.com/little-bear-labs/ipfs-chromium, https://github.com/ipfs/bifrost-gateway, https://github.com/filecoin-project/lassie, helia-enabled service worker, etc.).

While some of these tools use HTTP itself, it would also be nice if they could use the same semantics but without the requirements of CA certs (+ domain names), public IP addresses, etc. To enable this we can use HTTP over libp2p.

This proposal is to start by enabling an optional server for Trustless Gateway over libp2p, and future issues may tackle support for client support as well.

The relevant pieces are:

  • Use the relevant HTTP over libp2p specs and go-libp2p implementation (e.g. .well-known support, etc.)
  • Add an (experimental) flag to enable support to enable support for the protocol
    • Note: check for any conflicts with the Experimental.P2pHttpProxy feature
    • Note: ensure the trustless gateway exposed this way runs with Fetch disabled Gateway.NoFetch=true (only return blocks that are in local repo and 5XX (502?) for the rest?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions