libp2p / libp2p/rust-libp2p

feat: allow custom service name for `mDNS`

Open
#5,949 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

decision-pending
Dominant language
Rust
Stars
5.6k
Forks
1.3k
Avg merge
8h 47m
Merged PRs (30d)
19

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in protocols/mdns/src/lib.rs, especially the current _p2p._udp service-name handling, and trace how Config is defined and used. Check RFC6763 section 7 for the required service-name form; the work is complete when Config accepts a custom well-formed service name without mDNS collisions.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.