Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Network Layer
  3. bonjour

bonjour

MITJavaScript

A pure JavaScript implementation of the Bonjour/Zeroconf protocol for service discovery and publishing on local networks.

GitHubGitHub
654 stars161 forks0 contributors

What is bonjour?

Bonjour is a Node.js library that implements the Bonjour/Zeroconf protocol, allowing applications to automatically discover and advertise services on a local network using multicast DNS. It solves the problem of manual service configuration by enabling dynamic discovery of devices like printers, servers, or IoT devices. Developers can publish their own services and browse for existing ones with a simple JavaScript API.

Target Audience

Node.js developers building applications that need to communicate on local networks, such as IoT devices, home automation systems, local servers, or peer-to-peer applications.

Value Proposition

Developers choose Bonjour because it's a pure JavaScript implementation with no native dependencies, making it easy to deploy across platforms. It provides a clean, event-driven API that simplifies service discovery and publishing compared to lower-level networking libraries.

Overview

A Bonjour/Zeroconf protocol implementation in JavaScript

Use Cases

Best For

  • Discovering HTTP servers or other services on a local network
  • Publishing IoT device services for automatic discovery
  • Building peer-to-peer applications that need to find peers locally
  • Creating local development tools that auto-discover services
  • Implementing printer or device discovery in Node.js applications
  • Setting up local service registries without complex configuration

Not Ideal For

  • Projects requiring service discovery over the internet or wide-area networks
  • Applications with strict security needs for encrypted and authenticated discovery protocols
  • Real-time systems that need low-latency communication beyond service advertisement
  • Environments where multicast DNS is blocked or unsupported, such as some corporate networks

Pros & Cons

Pros

Pure JavaScript Implementation

No native dependencies, as stated in the README, making it portable and easy to deploy on any Node.js platform without compilation hassles.

Simple Event-Driven API

Offers straightforward methods like publish and find with event listeners for 'up' and 'down' events, enabling dynamic service tracking without complex setup.

Flexible Configuration Options

Supports customizable service names, types, ports, protocols, and TXT records, allowing precise advertisement and filtering based on network needs.

Dependency-Free Integration

Built on multicast-dns but packaged as a standalone library, ensuring minimal external dependencies and seamless inclusion in JavaScript projects.

Cons

Local Network Limitation

Relies on multicast DNS, which is confined to local subnets, making it ineffective for cloud-based or segmented network environments.

Inherent Security Vulnerabilities

mDNS is broadcast-based and lacks encryption, exposing service details to eavesdropping, with no built-in authentication mechanisms in the library.

Callback-Based API Design

Uses traditional callbacks instead of modern Promises or async/await, which can lead to callback hell and less readable code for complex workflows.

Frequently Asked Questions

Quick Stats

Stars654
Forks161
Contributors0
Open Issues39
Last commit6 months ago
CreatedSince 2015

Tags

#bonjour#local-network#multicast-dns#nodejs#javascript-library#service-discovery#mdns#networking#zeroconf

Built With

J
JavaScript
N
Node.js

Included in

Network Layer579
Auto-fetched 9 hours ago

Related Projects

hypercorehypercore

Hypercore is a secure, distributed append-only log.

Stars2,912
Forks211
Last commit2 days ago
bittorrent-trackerbittorrent-tracker

🌊 Simple, robust, BitTorrent tracker (client & server) implementation

Stars1,939
Forks331
Last commit3 days ago
bittorrent-dhtbittorrent-dht

🕸 Simple, robust, BitTorrent DHT implementation

Stars1,281
Forks207
Last commit11 days ago
ipfsipfs

[ARCHIVED] now part of the https://github.com/ipfs/js-ipfs repo

Stars1,042
Forks288
Last commit6 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub