agnat / node_mdns

mdns/zeroconf/bonjour service discovery add-on for node.js
http://agnat.github.com/node_mdns
MIT License
868 stars 145 forks source link

Add underscore to allowed service type names #255

Open WeeJeWel opened 2 years ago

WeeJeWel commented 2 years ago

Some services have an _ in their service. This PR allows for those kinds of services.

agnat commented 2 years ago

Thanks for looking into this.

Some services have an _ in their service.

Yet they shouldn't. From http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt ...

   As defined the rules for service names [RFC 6335], Application
   Protocol Names may be no more than fifteen characters (not counting
   the mandatory underscore), consisting of only letters, digits, and
   hyphens, must begin and end with a letter or digit, must not contain
   consecutive hyphens, and must contain at least one letter.

node_mdns does not implement the full rule set, but the character set seems correct. How about adding an option to disable or override the check?

WeeJeWel commented 2 years ago

An opt-in flag seems good to me :)

agnat commented 2 years ago

Hehe, yeah... that’s not going to happen. ;)

On 29. Nov 2021, at 00:05, Emile Nijssen @.***> wrote:

An opt-in flag seems good to me :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

WeeJeWel commented 2 years ago

Sorry, i thought that was what you were proposing?

agnat commented 2 years ago

Ah, so sorry... I thought you meant an opt-in for the conformance check. But you meant an opt-in for underscores.

Yes, that'll work.