You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a go-libp2p host behind a NAT with port forwarding enabled or another environment where the user might know more about the addresses to advertise than go-libp2p has been able to discover (e.g. DNS addresses) users pass in their addresses via the AddrsFactory option
As I understand it the AddrsFactory takes in the list of addresses that go-libp2p thinks it should be advertising and then allows the user to modify that list (e.g. override/remove elements, add new ones, etc.). The multiaddrs processed and returned by this function are ones that do not have the /p2p/<peerID> suffix.
Unfortunately, this behavior doesn't work for WebTransport since naively adding an additional /ip4/1.2.3.4/udp/1234/quic-v1/webtransport will be broken due to the lack of WebTransport certificates that are not added internally by go-libp2p. This is not something the user can reasonably deal with by passing the certificates themselves without understanding (and replicating) the internal go-libp2p mechanism for managing WebTransport certificates (having deterministic certificates generated with timestamps based on dividing time into fixed intervals) or finding some awkward workaround (e.g. having a loopback webtransport listener and then reading the certificates go-libp2p has emitted for the loopback listener and feeding it back into the AddrsFactory).
The text was updated successfully, but these errors were encountered:
@p-shahi : I know I missed go-libp2p triage. Was this discussed at all? Given it's relevant for IPFS Thing demos, I wanted to set expectations for people on whether it will get picked up soon or not.
aschmahmann
changed the title
Cannot advertise WebTransport with externally known addresses (port forwarding, dns, etc.)
Cannot advertise WebTransport with externally known addresses (external static IP + port forwarding, dns, etc.)
Apr 2, 2023
When running a go-libp2p host behind a NAT with port forwarding enabled or another environment where the user might know more about the addresses to advertise than go-libp2p has been able to discover (e.g. DNS addresses) users pass in their addresses via the
AddrsFactory
optiongo-libp2p/options.go
Line 260 in 8c466ab
As I understand it the
AddrsFactory
takes in the list of addresses that go-libp2p thinks it should be advertising and then allows the user to modify that list (e.g. override/remove elements, add new ones, etc.). The multiaddrs processed and returned by this function are ones that do not have the/p2p/<peerID>
suffix.Unfortunately, this behavior doesn't work for WebTransport since naively adding an additional
/ip4/1.2.3.4/udp/1234/quic-v1/webtransport
will be broken due to the lack of WebTransport certificates that are not added internally by go-libp2p. This is not something the user can reasonably deal with by passing the certificates themselves without understanding (and replicating) the internal go-libp2p mechanism for managing WebTransport certificates (having deterministic certificates generated with timestamps based on dividing time into fixed intervals) or finding some awkward workaround (e.g. having a loopback webtransport listener and then reading the certificates go-libp2p has emitted for the loopback listener and feeding it back into theAddrsFactory
).The text was updated successfully, but these errors were encountered: