Add a local control socket and nebula ctl (#1975)

Add support for accessing the previously ssh-only debug commands via
`nebula ctl <command>.`

- unix socket (named pipe on windows) for communication
- sockets scoped to the user + an optional group
- in cmd/nebula and cmd/nebula-service, but not nebula.Main

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Matt RichardsonandClaude Fable 5.1 authored and GitHub committed 2026-10-21 11:16:00 -04:00
1 parent 9a5bdb508e
commit 0f767ce529
54 files changed
+7581 -925

No files matched your search

+20
View File
@@ -234,6 +234,26 @@ punchy:
#trusted_cas:
#- "ssh public key string"
# Local APIs allow accessing running nebula state.
#local_api:
# There are two types of sockets available: a control socket intended for use on the
# local machine, primarily for debugging, and an info socket intended to make
# nebula's internal state available to other consumers.
#
# The control socket is made available by default, and can be accessed via
# `nebula ctl <command>`. It defaults to /var/run/nebula/ctl.sock on Linux, macOS and
# the BSDs; on Windows it is a named pipe under \\.\pipe\ProtectedPrefix\Administrators.
#control:
# Set to false to turn the control socket off. Reloadable.
#enabled: true
# The absolute path where the control socket should live, or a full pipe name on
# Windows. The last directory is created if missing, and must be owned by root or by
# the user running nebula. It must not be writable by anyone else.
#socket: /var/run/nebula/ctl.sock
# A group (or account/group/SID on Windows) that should be allowed to access the
# socket.
#group: nebula
# EXPERIMENTAL: relay support for networks that can't establish direct connections.
relay:
# Relays are a list of Nebula IP's that peers can use to relay packets to me.