mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-21 09:46:40 +00:00
[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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user