This example proxies all HTTP requests to a libp2p peer. It uses a service worker to intercept the browser's fetch requests and send them over a libp2p stream transport.
Configure the peer you want to connect to by setting its multiaddr URI in
the hash component of the url. For example if you wanted to connect to the
peer at /ip4/127.0.0.1/udp/4001/quic-v1/webtransport/... you
would set the URL to /#multiaddr:/ip4/127.0.0.1/udp/4001/quic-v1/webtransport/...
From that point on, all requests will be proxied to that peer. To proxy it to a different peer, repeat the step or
set the URL to /#_reset
Here's an example (if this fails, this server is probably not up. Refer to the README on how to setup a
server):
/#multiaddr:/ip4/209.38.148.248/udp/64590/quic-v1/webtransport/...
Here's another example:
/#multiaddr:/ip4/209.38.148.248/udp/64591/quic-v1/webtransport/...