feat: allow custom service name for `mDNS`
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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