feat(gateway): add optional bonjour/mdns discovery

This commit is contained in:
William Valentin
2026-02-16 01:48:59 -08:00
parent 7a298576e8
commit 323bef0526
9 changed files with 410 additions and 1 deletions
+21
View File
@@ -757,6 +757,27 @@ server:
When enabled, Flynn runs `tailscale serve` on startup to expose the gateway port over your tailnet, and cleans up on shutdown. The `flynn doctor` command includes a Tailscale availability check.
## Bonjour / mDNS Discovery
Optionally advertise the gateway on your local network so LAN clients can discover Flynn without manual host entry.
```yaml
server:
localhost: false
discovery:
enabled: true
service_name: flynn-gateway
service_type: _flynn._tcp
txt:
env: home-lab
```
Notes:
- Discovery is disabled by default.
- `server.localhost` must be `false` for LAN clients to connect.
- Flynn advertises non-secret metadata only (instance/version + optional `txt` keys you provide).
- Runtime uses host tools (`avahi-publish-service` on Linux, `dns-sd` on macOS) when available.
## DM Pairing Codes
Allow unknown senders to authenticate with the bot via time-limited pairing codes. Works across all channel adapters (Telegram, Discord, Slack, WhatsApp).