Skip to content

Resolve DNS portions of WebTransport addresses before dialing #3286

@achingbrain

Description

@achingbrain

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood issue for new contributorshelp wantedSeeking public contribution on this issuekind/enhancementA net-new feature or improvement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions