MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _wg_interfaces

Function _wg_interfaces

network_diagnostics.py:612–618  ·  view source on GitHub ↗

Names of active WireGuard interfaces (definitive, catches custom-named tunnels the running iproute2 may not tag as 'wireguard'). Needs `wg`.

()

Source from the content-addressed store, hash-verified

610 power = power[0]
611 if not isinstance(power, dict) or not power:
612 return None
613
614 def val(k):
615 v = _scalar(power.get(k))
616 return str(v).strip() if v is not None else None
617
618 def truthy(v):
619 return str(v).strip().lower() in ('yes', 'true', '1', 'on', 'enabled')
620
621 device_type = val('device-type') or val('device_type')

Callers 1

_iface_vpn_infoFunction · 0.85

Calls 2

_haveFunction · 0.85
_runFunction · 0.85

Tested by

no test coverage detected