- Execute
awg show all dumpviastd::process::Command - Parse output into
AwgInterface/AwgPeerstructs - Handle missing binary gracefully (warn + skip cycle)
-
allowed_ipssaved inpeerstable on every poll
- Scan config directory for
*.conffiles (non-recursive) - Extract
[Peer] PublicKey+[Interface] Address - Schema columns
config_name,config_pathadded topeers - Poller runs config scan after each AWG poll cycle
- Idempotent mapping: clear-then-apply on every cycle
- Warn+skip on unreadable files; skip-on-missing-dir
-
unlinkedstatus correctly driven byhas_config
- SQLite via sqlx;
peers,snapshots,events,interfaces,userstables - Migrations
0001(schema) +0002(config_name,config_path) -
update_peer_metadatafor rename/comment support
- Background Tokio task, configurable interval
- Snapshot insertion per poll; peer upsert (including
allowed_ips) - Config mapping step after AWG step; logged per cycle
-
GET /api/peers/:id/history?range=24h|7d|30d - Per-snapshot deltas with counter-reset handling
-
GET /– server-rendered HTML peer list -
GET /peers/:id– server-rendered HTML peer detail + edit form
-
normalize_display_name()/normalize_comment()in domain layer -
update_peer_metadata(pool, id, name, comment)DB function -
PATCH /api/peers/:id– JSON API endpoint (partial update) -
POST /peers/:id– HTML form endpoint (PRG redirect)
-
AuthConfigstruct withenabled,username,password_hash,api_token,secure_cookie - Argon2id password verification (constant-time)
- In-memory session store with lazy expiry cleanup
- 32-byte
OsRngsession IDs -
GET /login+POST /login+POST /logout - Auth middleware protecting all HTML + API routes
- HTML → redirect to
/login; API → 401 JSON - Optional bearer token via
AUTH_API_TOKEN - Logout button in nav bar on all pages
-
AUTH_ENABLED,AUTH_USERNAME,AUTH_PASSWORD_HASH,AUTH_API_TOKEN,AUTH_SECURE_COOKIEenv vars - Health endpoint stays public
- 29 new auth-specific tests
- CSRF tokens on all HTML write forms (
POST /login,POST /logout,POST /peers/:id) - Login rate limiting: 5 attempts per 5-minute window per IP; 429 on excess
- Configurable session TTL via
AUTH_SESSION_TTL_SECS(default 24 h) - Systemd service unit file (
packaging/amneziawg-web.service) - Reverse-proxy config examples in
docs/DEPLOYMENT.md(nginx, Caddy) - Constant-time CSRF token comparison (
csrf_eq()) - Pre-login CSRF token store (short-lived, single-use)
- Tests for CSRF, rate limiting, session expiry, valid/invalid CSRF flows
-
eventstable (existed from initial migration); addedpeer_idINTEGER FK column via migration0003 -
src/db/events.rs–EventRow,EVT_*constants,log_event(),list_events() -
GET /api/events– filterable bypeer_id,event_type,limit -
peer_updatedevent logged fromPATCH /api/peers/:idandPOST /peers/:id -
login_success,login_failed,logoutevents logged from auth handlers - Recent activity shown on
/peers/:idHTML page (last 20 events) - Logging is fire-and-forget – never breaks main operation
- 17 new audit-related tests (155 total)
- Enable / disable peer (
PATCH /api/peers/:idwith"disabled": true/false) - Download client config (
GET /api/peers/:id/config) - HTML form disabled checkbox on peer detail page
- Audit event
peer_disabledlogged on state change - Admin module helper
execute_set_peer_enabled - 12 new Epic 10 tests (167 total)
Choose one of:
- Persistent session store – DB-backed sessions that survive restarts.
- Export / backup and restore – SQLite dump endpoint or file download.
- Release packaging –
.deb/.rpmpackage or Docker image with the binary + systemd unit.
- README overhaul: screenshot placeholders, architecture diagram, feature comparison table, "vs status script" section
-
docs/INSTALL.md: full installation guide (prerequisites, build, systemd, Docker, reverse proxy) -
.env.example: all variables documented with comments and safe defaults -
Dockerfile+.dockerignore: multi-stage build, slim Debian runtime, non-root user -
CONTRIBUTING.md: bug reporting, PR guidelines, security note -
docs/RELEASE.md: v0.1.0 release checklist and release notes template -
docs/ROADMAP.mdupdated with all complete epics - Terminology and cross-links consistent across all docs
- Publish v0.1.0 – tag the release, optional binary upload to GitHub Releases
- Persistent session store – DB-backed sessions that survive restarts
- Export / backup – SQLite dump or JSON export endpoint