Skip to content

feat: allow custom service name for mDNS #5949

Description

@erhant

Description

The mdns protocol always uses _p2p._udp (see here) as its service name.

We should be able to provide our own service name for mDNS instead.

Motivation

Multiple protocols on a single node using libp2p-mdns will collide due to service name, and have to resolve their collision at application level / other protocol's level (e.g. different gossipsub topic).

It makes most sense to allow a specific service name for the developer, also makes diagnostics with dns-sd command much easier.

Requirements

  • Allow service name to be provided from Config
  • Ensure that service name is well-formed (RFC6763 section 7)

Open questions

No response

Are you planning to do it yourself in a pull request?

Maybe

Metadata

Metadata

Assignees

No one assigned

    Labels

    decision-pendingMarks issues where a decision is pending before we can move forward.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions