-
Notifications
You must be signed in to change notification settings - Fork 497
Description
Chrome disallows multiple cancelled WebTransport requests to the same host to prevent port scanning. Penalty counts are stored internally in a map with string keys - the keys are the IP address being dialled.
If a multiaddr has a domain name, it must be resolved before it can be dialled, otherwise the IP address used in Chrome's map is an empty string.
If the dial is cancelled before the DNS name is resolved, the penalty is applied to the empty string key. This means dials to all multiaddrs with a DNS component are penalised if one dial to a multiaddr with a DNS component is cancelled before the DNS name is resolved.
If libp2p is running in Chrome, and it is dialing a WebTransport address, we should use the internal DNS component to resolve the DNS name to an IP address before dialling, this way if the dial is aborted by the user or times out, all DNS-based WebTransport multiaddrs will not be penalised.