{"id":28962755,"url":"https://github.com/engeloded/mdns-relay-rs","last_synced_at":"2026-05-16T18:01:54.411Z","repository":{"id":300244416,"uuid":"1005658381","full_name":"engeloded/mdns-relay-rs","owner":"engeloded","description":"A fast, cross-platform mDNS relay written in Rust with multi-arch Docker support","archived":false,"fork":false,"pushed_at":"2025-06-21T13:27:25.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-21T14:25:20.044Z","etag":null,"topics":["docker","mdns","mdns-relay","networking","relay","rust","zeroconf"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/engeloded.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T15:31:04.000Z","updated_at":"2025-06-21T13:47:19.000Z","dependencies_parsed_at":"2025-06-21T14:25:22.592Z","dependency_job_id":null,"html_url":"https://github.com/engeloded/mdns-relay-rs","commit_stats":null,"previous_names":["engeloded/mdns-relay","engeloded/mdns-relay-rs"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/engeloded/mdns-relay-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engeloded%2Fmdns-relay-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engeloded%2Fmdns-relay-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engeloded%2Fmdns-relay-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engeloded%2Fmdns-relay-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/engeloded","download_url":"https://codeload.github.com/engeloded/mdns-relay-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engeloded%2Fmdns-relay-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278561275,"owners_count":26006954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","mdns","mdns-relay","networking","relay","rust","zeroconf"],"created_at":"2025-06-24T03:11:59.568Z","updated_at":"2025-10-06T04:50:01.686Z","avatar_url":"https://github.com/engeloded.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mdns-relay\n\nA lightweight, high-performance **mDNS (multicast DNS) relay** written in Rust.\n\nIt forwards mDNS packets between network interfaces for both **IPv4 and IPv6**, enabling service discovery across isolated subnets — ideal for **Matter**, **HomeKit**, and other protocols that rely on link-local multicast.\n\n---\n\n## ✨ Features\n\n* 📡 Supports IPv4 (`224.0.0.251`) and IPv6 (`ff02::fb`)\n* 🔁 Interface-to-interface forwarding with unidirectional or bidirectional configuration\n* 🧠 Loop prevention with TTL-based deduplication cache\n* 🔧 Clean, TOML-based configuration (config-driven architecture)\n* ⚡ Single-threaded `tokio` async runtime\n* 🖥️ Native systemd support for Linux\n* 🐳 Docker-ready with multi-arch support (x86\\_64, ARM64, ARMv7)\n* 📊 Runtime statistics logging for packet processing\n\n---\n\n## 🚀 Quick Start\n\n### Requirements\n\n* Linux (with multicast + `NET_RAW` support)\n* Docker (for container usage; host networking required)\n* `systemd` (for native service management)\n\n### Install \u0026 Run\n\n```bash\n# Build or download binary\nmake build\n\n# Copy config and binary\nsudo cp target/x86_64-unknown-linux-musl/release/mdns-relay /usr/local/bin/\nsudo cp etc/mdns-relay.toml /etc/\n\n# Run manually (uses /etc/mdns-relay.toml)\nmdns-relay\n\n# Show version or help\nmdns-relay --version\nmdns-relay --help\n```\n\n---\n\n## 🔧 Configuration (`/etc/mdns-relay.toml`)\n\nThe service is fully config-driven using a TOML file.\n\nBy default, it loads `/etc/mdns-relay.toml`, but this path can be overridden via `--config`.\n\n➡️ See the full documented config file at [`etc/mdns-relay.toml`](./etc/mdns-relay.toml) for all supported options and examples.\n\n```toml\n# Interface bridging\n[[interface]]\nsrc = \"eth0\"\ndst = \"wlan0\"\nstack = \"dual\"\n\n[[interface]]\nsrc = \"wlan0\"\ndst = \"eth0\"\nstack = \"dual\"\n\n# TTL-based cache to prevent loops\nttl = 10\ncache_size = 1000\n\n# Logging\nlog_level = \"info\"\nlog_format = \"pretty\"\n\n# Performance tuning\nbuffer_size = 2048\nmax_events = 64\nloop_detection_ms = 200\nstats_interval_seconds = 300\ncleanup_interval_seconds = 30\nmax_packet_size = 9000\n```\n\n\u003e 🔍 See [example configurations](#-example-configurations) for VLANs, Docker, and Proxmox setups.\n\n---\n\n## 🖥️ Run as systemd Service (Linux)\n\n```bash\n# Install binary + service\nmake install\n\n# Start service\nsudo systemctl enable --now mdns-relay\nsudo systemctl status mdns-relay\n\n# Logs\nsudo journalctl -u mdns-relay -f\n```\n\n---\n\n## 🐳 Run with Docker\n\n```bash\ndocker build -t mdns-relay .\n\ndocker run --rm --net=host --cap-add=NET_RAW \\\n  -v /etc/mdns-relay.toml:/etc/mdns-relay.toml:ro \\\n  mdns-relay:latest\n```\n\n### Docker Compose\n\n```yaml\nversion: '3.8'\n\nservices:\n  mdns-relay:\n    build: .\n    image: engeloded/mdns-relay:latest\n    network_mode: host\n    cap_add: [NET_RAW]\n    volumes:\n      - /etc/mdns-relay.toml:/etc/mdns-relay.toml:ro\n    restart: unless-stopped\n```\n\n\u003e 💡 The `:latest` tag is a multi-arch manifest (x86\\_64, arm64, armv7).\n\u003e You can also pull a specific image like:\n\u003e\n\u003e ```bash\n\u003e docker pull engeloded/mdns-relay:1.0.0-aarch64-unknown-linux-musl\n\u003e ```\n\n---\n\n## 🏗️ Build from Source\n\n```bash\n# Build for your native system\nmake build\n\n# Build for ARM64 (RPi 4+)\nmake build TARGET=aarch64-unknown-linux-musl\n\n# Build for ARMv7 (RPi 3)\nmake build TARGET=armv7-unknown-linux-musleabihf\n\n# Build for all supported platforms\nmake build-all\n```\n\n---\n\n## 🔍 Command Line Options\n\n```bash\nmdns-relay --help\n```\n\n```\nUsage: mdns-relay [OPTIONS]\n\nOptions:\n  -c, --config \u003cFILE\u003e  Configuration file path [default: /etc/mdns-relay.toml]\n  -v, --version        Print version information\n  -h, --help           Print help\n```\n\n---\n\n## 🧰 Example Configurations\n\n### HomeKit or Matter Across Wi-Fi \u0026 Ethernet\n\n```toml\n[[interface]]\nsrc = \"eth0\"\ndst = \"wlan0\"\nstack = \"dual\"\n\n[[interface]]\nsrc = \"wlan0\"\ndst = \"eth0\"\nstack = \"dual\"\n```\n\n### Bridging VLANs\n\n```toml\n[[interface]]\nsrc = \"eth0\"\ndst = \"eth0.100\"\nstack = \"ipv4\"\n```\n\n### Docker Host + LAN\n\n```toml\n[[interface]]\nsrc = \"docker0\"\ndst = \"eth0\"\nstack = \"ipv4\"\n```\n\n### Proxmox or Hypervisor Networks\n\n```toml\n[[interface]]\nsrc = \"vmbr0\"\ndst = \"eth0\"\nstack = \"dual\"\n```\n\n---\n\n## 🥮 Troubleshooting\n\n### Debug Mode\n\n```toml\nlog_level = \"debug\"\n\n[[interface]]\nsrc = \"eth0\"\ndst = \"eth1\"\nstack = \"dual\"\n```\n\n```bash\nmdns-relay --config debug.toml\n```\n\n### mDNS Discovery\n\n```bash\n# View services\navahi-browse -a\ndns-sd -B _services._dns-sd._udp\n```\n\n### Log Monitoring\n\n```bash\n# systemd logs\nsudo journalctl -u mdns-relay -f\n\n# Docker logs\ndocker logs -f mdns-relay\n```\n\n---\n\n## 🧠 Best Practices\n\n* Use `stack = \"dual\"` for maximum compatibility\n* Use bidirectional interface definitions (src → dst and dst → src)\n* Always verify interface names via `ip link show`\n* Ensure Docker runs with `--net=host --cap-add=NET_RAW`\n* Test with `log_level = \"debug\"` to confirm packet flow\n\n---\n\n## 📦 Docker Images\n\nPublished with `make release`, tags include:\n\n* `engeloded/mdns-relay:latest` – multi-arch (auto-selects arch)\n* `engeloded/mdns-relay:\u003cversion\u003e-\u003ctarget\u003e` – arch-specific\n\nSupported targets:\n\n* `x86_64-unknown-linux-musl`\n* `aarch64-unknown-linux-musl`\n* `armv7-unknown-linux-musleabihf`\n* `i686-unknown-linux-musl`\n\n---\n\n## 📜 License\n\nMIT License — see [LICENSE](./LICENSE)\n\n---\n\n## ✍️ Author\n\nCreated by **Engel Oded**\nContributions and feedback welcome!\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengeloded%2Fmdns-relay-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengeloded%2Fmdns-relay-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengeloded%2Fmdns-relay-rs/lists"}