module

Pared::NetworkManager::WireguardScanner

Class methods

wg_runner
Source
wg_runner=(wg_runner : Proc(Array(String), String))
Source

Instance methods

interfaces

Returns nil when the kernel state cannot be read (wg missing, no permissions, runner failure) so callers can fail closed instead of treating an unreadable device set as an empty one.

Source
parse_all_dump(output : String) : Array(WireguardInterface)

Parses wg show all dump where each interface line carries five fields and each peer line carries nine (interface name first). Peers are collected per interface name and attached at the end so the result never depends on array aliasing or line order.

Source