Documentation
¶
Overview ¶
Copyright (c) 2026 Veld Authors. SPDX-License-Identifier: MIT
Copyright (c) 2026 Veld Authors. SPDX-License-Identifier: MIT
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Daemon ¶
type Daemon struct {
// contains filtered or unexported fields
}
Daemon wires together TUN, UDP conn, peer table, dispatcher, handshake manager, optional coord client, optional NAT manager, and IPC server.
func New ¶
func New( localID *crypto.Identity, networkID [16]byte, t tun.TUN, conn net.PacketConn, peerTbl *peer.Table, ) *Daemon
New creates a Daemon from pre-constructed components. peerTbl must already be populated. Call Start to begin processing.
func NewFromConfig ¶
NewFromConfig creates a Daemon with real OS TUN and UDP socket. Requires CAP_NET_ADMIN on Linux.
type IPCServer ¶
type IPCServer struct {
// contains filtered or unexported fields
}
IPCServer is an HTTP server on a Unix domain socket that exposes daemon state.
func NewIPCServer ¶
NewIPCServer creates an IPC server at the given socket path. stopFn is invoked when POST /api/shutdown is received.
func (*IPCServer) Stop ¶
func (s *IPCServer) Stop()
Stop shuts down the IPC server and removes the socket file.
func (*IPCServer) UpdateStatus ¶
func (s *IPCServer) UpdateStatus(st StatusResponse)
UpdateStatus atomically replaces the cached status.
type PeerStatus ¶
type StatusResponse ¶
type StatusResponse struct {
Running bool `json:"running"`
VPNAddr string `json:"vpn_addr,omitempty"`
PeerID string `json:"peer_id,omitempty"`
NetworkID string `json:"network_id,omitempty"`
CoordAddr string `json:"coord_addr,omitempty"`
Peers []PeerStatus `json:"peers"`
}
StatusResponse is returned by GET /api/status.