awguapi

package
v0.2.0-dev.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package awguapi renders and parses the UAPI text protocol of amneziawg-go v3.1.x (device.IpcSet / IpcGet). It is pure text code and builds everywhere.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeviceSet

func DeviceSet(version string, priv [32]byte, port uint16, o awgcfg.Obfuscation) string

DeviceSet renders the device part of a set operation: key, port and the obfuscation of version v. Keys of the other version are not written (amneziawg-go 0.2.x rejects the 3.x ones). Order does not matter: S/H/HPK are validated together when the message ends. IpcSet is NOT atomic: a line that fails leaves the lines before it applied (measured), so a failed set is followed by recreating the interface, never by a retry on it.

func ParseStats

func ParseStats(s string) ([]awgcfg.PeerStat, error)

ParseStats reads device.IpcGet() output: per peer the public key, counters, last handshake, endpoint and allowed ips. Device lines before the first public_key are skipped (they carry the private key: never logged).

func PeersSet

func PeersSet(replaceAll bool, peers []awgcfg.Peer) string

PeersSet renders peer operations. A peer starts at its public_key line; device keys must not follow a peer.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL