16 Commits

Author SHA1 Message Date
ruslan 17961e7079 fix: Made by Galyaviev pinned to bottom center on login page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 10:57:58 +03:00
ruslan 3bfb650b80 feat: route commands for peer clients (Linux/Windows) + footer signature
- scripts page: new card with Linux/macOS and Windows route commands
  per peer that has advertised_routes, with OS tab switcher and copy buttons
- Made by Galyaviev moved from sidebar to bottom-center page footer on all pages
- page-footer style: Dancing Script 20px, clickable mailto:ruslan@ipcom.su

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 10:54:57 +03:00
ruslan 530a260849 style: Made by Galyaviev larger, clickable mailto, remove login footer
- Increase signature font: sidebar 18px, login 20px
- Wrap in <a href="mailto:ruslan@ipcom.su"> on all pages
- Remove wg.4mont.ru footer and divider from login page

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 10:51:47 +03:00
ruslan e96078bc46 feat: fix YouTask peer enable + add Made by Galyaviev signature
- peer_enable: make PSK optional, only pass --client-preshared-key if non-empty
- peer_enable: strip /32 suffix from client_address before passing to wg-peerctl
- All pages: add "Made by Galyaviev" in Dancing Script handwritten font
- login.html: styled login page with signature below card
- base.html: signature in sidebar footer
- style.css: .made-by Dancing Script style

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 10:48:55 +03:00
ruslan 2391007a81 feat(gui): custom login page, session-based auth
Replace nginx auth_basic + HTTP Basic Auth with a styled Flask login form.
- Session-based authentication (cookie, session.permanent)
- Custom login page with logo, error state, clean form design
- CSRF check skipped for /login route
- Logout button in sidebar footer
- nginx auth_basic removed; ADMIN_PASSWORD restored in .env

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 10:42:44 +03:00
ruslan 0aead8c3ad feat(gui): inline peer rename
Click on peer name in the table to edit it inline.
Enter to save, Escape to cancel, blur also saves.
Saved via POST /peers/<id>/rename without page reload.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 10:25:28 +03:00
ruslan 667cdd90df feat(gui): add reverse DNS hostname detection for peers
Resolve hostname via PTR record on peer endpoint IP.
Results cached in memory for 5 minutes to avoid latency.
Hostname shown below endpoint in the peers table.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 10:23:12 +03:00
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 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 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 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 ae3da04d4a Server: replace wireguard-ui with built-in wg-admin-gui + PostgreSQL 2026-04-14 11:43:07 +03:00