feat(clients): add WireGuard state parsing and client listing
This commit is contained in:
@@ -19,3 +19,17 @@ full-line `#` comments are ignored; spaces around the key, `=`, and value are
|
||||
trimmed. Values are either one unquoted token or a double-quoted value without
|
||||
escapes, and only documented keys are accepted.
|
||||
|
||||
For deterministic read-only tests, `WG_MANAGER_NOW` may override the current
|
||||
epoch when set to decimal seconds; invalid values are rejected.
|
||||
|
||||
M2 adds read-only `status` and `list`. They parse the configured WireGuard file
|
||||
and, when available, `wg show <interface> dump`; a stopped or unavailable
|
||||
runtime is reported as unavailable and disk-only peers remain visible. `list`
|
||||
uses stable tab-separated output with English machine fields `state` and
|
||||
`origin` (`managed`, `legacy`, or `unmanaged`) and never prints private or
|
||||
preshared keys.
|
||||
|
||||
The explicit peer comment marker is `# wg-manager-client: NAME`; it is only a
|
||||
display candidate. A peer is considered managed only when its exact public key
|
||||
and configured addresses match a valid metadata record with `MANAGED=1`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user