[self-hosted] add netbird server (#5232)

* Unified NetBird combined server (Management, Signal, Relay, STUN) as a single executable with richer YAML configuration, validation, and defaults.
  * Official Dockerfile/image for single-container deployment.
  * Optional in-process profiling endpoint for diagnostics.
  * Multiplexing to route HTTP/gRPC/WebSocket traffic via one port; runtime hooks to inject custom handlers.
* **Chores**
  * Updated deployment scripts, compose files, and reverse-proxy templates to target the combined server; added example configs and getting-started updates.
This commit is contained in:
Misha Bragin
2026-02-12 19:24:43 +01:00
committed by GitHub
parent 69d4b5d821
commit 64b849c801
23 changed files with 2198 additions and 603 deletions

View File

@@ -3,6 +3,7 @@ package server
import (
"context"
"crypto/tls"
"net"
"net/url"
"sync"
@@ -134,3 +135,10 @@ func (r *Server) ListenerProtocols() []protocol.Protocol {
func (r *Server) InstanceURL() url.URL {
return r.relay.InstanceURL()
}
// RelayAccept returns the relay's Accept function for handling incoming connections.
// This allows external HTTP handlers to route connections to the relay without
// starting the relay's own listeners.
func (r *Server) RelayAccept() func(conn net.Conn) {
return r.relay.Accept
}