Commit Graph

38 Commits

Author SHA1 Message Date
ruslan fe1cba2d02 fix(gui): correct wg dump indexes, status, traffic, UX improvements
- Fix off-by-one bug in wg_dump(): handshake was read from parts[5] (rx_bytes),
  now correctly reads from parts[4]; rx/tx shifted accordingly
- Run wg show via sudo to work under unprivileged wgadmin user
- Remove NoNewPrivileges from systemd service (needed for sudo)
- Merge Handshake column into Status badge (shows "online · 2м назад")
- Add humanize_ago() for human-readable handshake time
- Add next_free_ip() to suggest next available IP in new peer form
- Add device type quick-select buttons (Phone/Laptop/PC/Router/Server/Tablet)
- Placeholder in AllowedIPs now shows the real next free IP
- Traffic column shows ↓ rx / ↑ tx separately

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 10:18:38 +03:00
ruslan 904582e7fa feat(gui): security hardening, UI overhaul, light theme
- CSRF protection on all POST forms (session token)
- ensure_schema() moved to module-level, removed from before_request
- gunicorn now binds to 127.0.0.1 only, runs as unprivileged user wgadmin
- nginx reverse proxy with HTTPS (Let's Encrypt, wg.4mont.ru)
- HTTP → HTTPS redirect before Basic Auth prompt
- Auth moved to nginx level (auth_basic), wg-peerctl called via sudo
- ufw firewall: only 22/80/443/51820 open
- fail2ban: SSH + nginx (5 attempts → 1h ban)
- Add Enable/Disable toggle buttons in peer table
- Add .conf file download route
- Light theme: white background, blue accent, subtle shadows
- Modern sidebar layout, styled badges, responsive forms

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 10:10:19 +03:00
Ruslan 530e93c1df WG: apply advertised routes on server immediately; relax rp_filter for routed clients 2026-04-14 13:01:30 +03:00
Ruslan 02ccad1805 GUI: resolve external peers to wg-peerctl hostnames from wg0.conf 2026-04-14 12:52:10 +03:00
Ruslan 22680a0df5 GUI: allow deleting external peers from client list 2026-04-14 12:50:47 +03:00
Ruslan 8e124be1f0 GUI: status accuracy + remove-only action; sync script peer names on exists 2026-04-14 12:47:31 +03:00
Ruslan 54868b99cd Client: auto-enable LAN forwarding/NAT; GUI: relax online status window 2026-04-14 12:40:37 +03:00
Ruslan 69f51bd5d7 GUI: add enable/disable/delete peer actions and sync script-added peers 2026-04-14 12:37:41 +03:00
Ruslan bb6cdb58ed GUI: add persistent QR/config view and handshake-based online status 2026-04-14 12:27:26 +03:00
Ruslan bdfc648bba GUI: fix QR generation for PyPNG backend 2026-04-14 12:22:38 +03:00
Ruslan 9b31c5d5c5 GUI: make SQLite writes compatible with older sqlite versions 2026-04-14 12:12:34 +03:00
Ruslan 8de590c5d0 GUI: auto-fill split AllowedIPs in New Peer form 2026-04-14 12:10:03 +03:00
Ruslan cd5ba53802 GUI: migrate storage from PostgreSQL to SQLite and expose conf download 2026-04-14 12:08:10 +03:00
Ruslan 39d17534e0 Chore: ignore Python cache artifacts 2026-04-14 11:43:16 +03:00
Ruslan ae3da04d4a Server: replace wireguard-ui with built-in wg-admin-gui + PostgreSQL 2026-04-14 11:43:07 +03:00
Ruslan e2d3993fb3 Client: prevent log lines from being written into wg0.conf 2026-04-14 11:22:17 +03:00
Ruslan b54437a480 Client: detect apt install candidate for resolvconf packages 2026-04-14 11:04:15 +03:00
Ruslan df24ccb96a Client: auto-detect LAN subnets and auto-fill split allowed-ips 2026-04-14 10:59:51 +03:00
Ruslan f5cc07fbbb Client: handle missing resolvconf when DNS is set 2026-04-14 10:54:17 +03:00
Ruslan 5542fbdaee Client: preserve base64 padding when parsing server key response 2026-04-14 10:45:35 +03:00
Ruslan a35c814bab Client: advertise LAN subnets via peer AllowedIPs 2026-04-14 10:42:36 +03:00
Ruslan f9969b668a Client: default interface address prefix to /24 2026-04-14 10:41:12 +03:00
Ruslan 81a725561a Client: enforce clean reset on every reinstall run 2026-04-14 10:30:05 +03:00
Ruslan 669867569e Server: auto-apply GUI config changes to live WireGuard interface 2026-04-14 10:26:43 +03:00
Ruslan 45cafe0165 UX: accept direct password input at GUI replace prompt 2026-04-14 10:16:44 +03:00
Ruslan 278b403e09 WireGuard: add clean reinstall flow and bootstrap wg-install 2026-04-14 10:04:25 +03:00
Ruslan cbc2f5bf45 fix(gui): интерактивно предлагать сброс БД при старой подсети 10.252.1.x 2026-04-14 00:48:04 +03:00
Ruslan 99136b5403 feat(server): добавить --gui-reset-db для синхронизации дефолтов GUI 2026-04-14 00:39:26 +03:00
Ruslan 2cd09198e1 fix(gui): удалять все legacy compose контейнеры wireguard-ui перед up 2026-04-14 00:30:04 +03:00
Ruslan 3ee7406969 fix(gui): обработка KeyError ContainerConfig для legacy docker-compose 2026-04-14 00:29:03 +03:00
Ruslan d6c3a0977d feat(gui): настроить дефолты для QR в wireguard-ui и добавить инструкцию для iPhone 2026-04-14 00:27:32 +03:00
Ruslan b0fab364cb docs(readme): добавить однострочный запуск клиента без git clone 2026-04-14 00:23:30 +03:00
Ruslan 19a3e105ae docs(readme): добавить однострочный запуск сервера и уточнение про GUI 2026-04-14 00:23:02 +03:00
Ruslan e51b7c4dda fix(server): поддержка docker-compose на Ubuntu 22.04 2026-04-14 00:17:40 +03:00
Ruslan 16030d8e6c fix(common): стабильная генерация случайных строк при pipefail 2026-04-14 00:14:43 +03:00
Ruslan 67f28fae49 feat(server): добавить явную ссылку на GUI в конце сводки 2026-04-14 00:11:08 +03:00
Ruslan c2d70471db feat(server): генерировать GUI-пароль 8 символов с опцией замены 2026-04-14 00:10:41 +03:00
Ruslan a31f1a1090 feat: автоматизация установки и настройки WireGuard сервера и клиента 2026-04-14 00:04:06 +03:00