libp2p / specs

Technical specifications for the libp2p networking stack
https://libp2p.io
1.56k stars 273 forks source link

libp2phttp: Define the multiaddr URI #568

Closed MarcoPolo closed 3 months ago

MarcoPolo commented 1 year ago

This defines a multiaddr URI scheme. This would enable HTTP redirects to other hosts and resources. In Go, this would enable a single http.RoundTripper to work on any transport. In JS, we would be able to create a new Request with this URI and use it with a custom fetch to make HTTP requests to any transport.

Example:

multiaddr:/ip4/1.2.3.4/udp/54321/quic-v1/p2p/12D.../httppath/.well-known%2Flibp2p

If we approve this, we should likely register this scheme with IANA. PL has registered other schemes in the past, so I think it is doable (ipfs and ipns).