3 Commits
Author SHA1 Message Date
asminme babbdee26d 1.0.7 - polski interfejs i porządki w dokumentacji
Wydanie WGTools-Extended / release (push) Successful in 8s
2026-10-30 15:04:45 +01:00
asminme 97f73a6277 1.0.6 - interfejs mobilny i potwierdzenie
Wydanie WGTools-Extended / release (push) Successful in 9s
2026-10-30 14:51:56 +01:00
asminme f4929c7cac 1.0.5 - opisy usług w przekierowaniach
Wydanie WGTools-Extended / release (push) Successful in 11s
2026-10-30 13:15:39 +01:00
43 changed files with 333 additions and 24369 deletions

No files matched your search

+16 -761
View File
@@ -1,4 +1,19 @@
# Changelog
# Historia zmian
## v1.0.7
- Pozostawiono polski język panelu i bota Telegram.
- Usunięto dokument kontrybucji oraz historię zmian sprzed forka.
## v1.0.6
- Uporządkowano formularz usług i dodano przepisywanie potwierdzenia odpowiedzialności.
- Poprawiono nawigację, formularze i okna panelu na telefonach.
## v1.0.5
- Dodano konfigurowalne opisy usług i potwierdzenie odpowiedzialności przy przekierowaniach.
- Poprawiono wygląd pola ograniczenia adresów IP.
## v1.0.4
@@ -19,763 +34,3 @@
## v1.0.1
- Poprawiono nazwę tokenu używanego do publikacji wydania.
## v0.40.5
- Added an Audit shortcut to the top bar; the audit dialog can now open on any page.
- Replaced the redundant sidebar branding with a persistent expand/collapse control, synchronized with Settings.
- Removed the duplicate sidebar update alert while retaining the top-bar update badge.
- Removed the duplicate native/browser theme tooltip.
- Telegram bot now appends navigation and action messages to the chat history rather than overwriting them.
- Added read-only Telegram Audit pages of 20 records with newer/older navigation and a quick `/audit` command.
- Restricted action confirmations to their own prompt to prevent stale-button replay.
## v0.40.4
- Added complete German, French, Italian, Spanish and Polish interface translations alongside English and Russian, with English fallback for future keys.
- Added translated Help documentation in all five new languages, covering the four Help sections and 40 topics per language.
- Added a quick light/dark theme toggle in the top bar, synchronized with Appearance settings.
- Improved update detection and visibility: GitHub release metadata is refreshed every 15 minutes and available updates are surfaced in the top bar.
- Improved Audit records for WireGuard client deletion: events now identify the deleted client and interface rather than displaying only `client`.
- Preserved existing native-install settings during upgrades and excluded the test suite from installed runtime files.
- Extended localization and regression checks without changing WireGuard tunnel or routing behavior.
## v0.40.0
Major feature release focused on stronger administrator authentication and practical network-path diagnostics for VPS and remote WireGuard deployments.
### MFA and account security
- Added optional per-user TOTP multi-factor authentication compatible with **Google Authenticator**, 2FAS, Aegis and other standard authenticator apps.
- MFA enrollment uses a QR code with a manual setup-key fallback and generates one-time recovery codes for emergency access.
- Recovery codes are stored only as hashes; regenerating or disabling MFA invalidates the previous recovery set.
- Enabling/disabling MFA invalidates older web sessions for that account, and the MFA challenge is rate/attempt limited.
- Added root CLI emergency recovery: `wgtools disable-mfa [username]` disables MFA for a selected user if the authenticator device and recovery codes are lost.
- MFA-related Audit events never record TOTP secrets, authentication codes or recovery codes.
### Traceroute, ping and interactive route map
- Added a dedicated **Server → Route** tab for IPv4 network-path diagnostics to a VPS/server by IP address or hostname.
- Added four-packet ping summary, hop-by-hop traceroute, average RTT, hop-to-hop RTT delta and real partial response-loss information.
- Added an optional interactive OpenStreetMap route map with drag/pan, mouse-wheel and `+`/`−` zoom, automatic route fitting, numbered hops and clickable hop details.
- Public responding hop IPs are geolocated through `ipwho.is` only when map display is enabled; private/local addresses are never sent for geolocation and lookups are cached for 24 hours.
- Route segments and corresponding table hops are colored by RTT growth: green for normal growth, amber for increased latency and red for sharp jumps.
- Unanswered traceroute probes now use a neutral **No reply** state instead of misleading `100% loss`; unanswered trailing hops after the last responding router are hidden from the table.
- If the destination still answers normal ping while final traceroute hops are filtered, WGTools reports that neutrally instead of implying the target is unreachable.
- Increased traceroute probe depth to 30 hops while keeping the visible result compact.
### UI and reliability
- Static CSS/JavaScript/image assets now include a per-process revision so browsers cannot keep stale assets after a same-version redeploy/service restart.
- Fixed the MFA login transition after asynchronous password validation.
- Fixed the compact-sidebar update indicator dimensions so it no longer jumps when sidebar collapse is toggled quickly.
- Shortened the pre-update Audit action to **Pre-update backup** / **Резервная копия перед обновлением** because the result column already reports creation status.
- Installer runtime packages now include `iputils-ping` and `traceroute` for the network-path diagnostic.
## v0.30.0
Public release focused on a complete self-hosted WireGuard management workflow and safer day-to-day administration.
- Added multi-interface WireGuard management with interface-aware Dashboard, Server, Clients and raw configuration views.
- Added normal clients and Site-to-Site peers, reusable groups/policies, client isolation, PSK/key rotation, route presets, expiration and recurring schedules.
- Added managed routing, NAT/MASQUERADE, source policy routing, access rules, live reconciliation and safe raw `wg*.conf` editing with backup/rollback.
- Added durable handshake/RX/TX history, CPU/RAM/network monitoring, 24-hour graphs and quick search.
- Added VPS Relay for NAT-restricted servers, including protected transport, reconnect/reuse and migration recovery.
- Added WGTools Nodes (HUB/Spoke) with protected TCP pairing on the Nodes port, in-tunnel synchronization, explicit published-network allow-lists, overlap protection, return-path NAT and network-change warnings.
- Added complete `.wgtbackup` migration/restore for WGTools state, users, clients/keys, WireGuard configs, Relay metadata and Nodes identity.
- Added built-in Let’s Encrypt HTTPS for domain/public IP, custom HTTPS port, private panel path, automatic renewal and guided certificate-first activation.
- Added local users, SMTP password recovery, Telegram administration, audit history and persistent last-seen information.
- Added safe opt-in GitHub Release updates with pre-update backup and automatic rollback.
- Added the root `wgtools` management CLI with panel controls, detailed WireGuard peer status, start/stop/restart, logs, HTTP rescue, soft uninstall and protected FULL CLEANUP.
- Reworked built-in Help for beginners, refreshed RU/EN copy and screenshots, and added search-engine discovery guidance for the public project while explicitly preventing indexing of the private admin panel.
- Optimized Dashboard, Clients, Server and Nodes loading paths and background snapshots for faster navigation.
## v0.20.55
- WireGuard CLI `Status` now prints the full peer Endpoint instead of shortening the address.
- The one-row-per-peer layout remains; table columns adapt to the actual data and use the available terminal width.
## v0.20.54
- Reworked root CLI WireGuard `Status` into a compact one-row-per-peer table sized for the default 67-column WGTools/MobaXterm console.
- Each peer row now shows name, VPN IP, Online/Offline state, handshake age, endpoint and compact RX/TX; long endpoint/name values are shortened in-place instead of wrapping onto extra lines.
- Interface status is condensed to one summary line above its peer table.
## v0.20.53
- Aligned the root `wgtools` status box and action-menu box to the same terminal width.
- Simplified Panel and WireGuard action labels inside their sections to `Start`, `Stop`, `Restart`, and `Status` without repeating the section name.
- Expanded WireGuard `Status` into a practical peer/client view: per-interface state/address/port/total+online counts plus each peer name, VPN IP, Online/Offline state, handshake age, endpoint, and RX/TX traffic.
- WireGuard status reuses WGTools client metadata and accumulated traffic; for offline peers it falls back to the audit database for the last known handshake/endpoint when available.
## v0.20.52
- Expanded the root `wgtools` CLI WireGuard section with **Status**, **Start**, **Stop**, and **Restart** actions.
- WireGuard status shows each configured interface, runtime state, IPv4 address, listen port, peer count, and most recent handshake age.
- When multiple WireGuard interfaces exist, interactive Start/Stop/Restart asks which interface to control; direct CLI subcommands `status-wg`, `start-wg`, `stop-wg`, and `restart-wg` are also available.
- Renumbered logs/recovery and removal actions while keeping soft uninstall and FULL CLEANUP behavior unchanged.
## v0.20.51
- Tightened the root `wgtools` console menu by removing blank spacer rows above/below each section while keeping the boxed single-column layout.
- Section titles (Panel, WireGuard, Logs & recovery, Removal) are now highlighted in a dark WGTools-style red on compatible terminals; menu actions remain uncolored for readability.
## v0.20.50
- FULL CLEANUP now also removes systemd timer timestamp files (`/var/lib/systemd/timers/stamp-wgtools-*`) so expiry/certificate timer history does not remain after a destructive wipe.
## v0.20.49
- Refined the root `wgtools` console layout for terminal compatibility: retained the boxed design while fixing three misaligned right-border lines caused by multibyte separator characters in padded status rows.
- Reworked the action menu into a single-column layout with one action per line and blank spacing between Panel, WireGuard, Logs & recovery and Removal sections for easier reading in MobaXterm and other SSH terminals.
## v0.20.48
- Reworked the root `wgtools` terminal console into a boxed status/menu layout with grouped Panel, WireGuard, Logs & recovery and Removal actions.
- Added menu action **9. Uninstall WGTools** for removing the application/services/CLI and internal Nodes/local Relay-home transports while intentionally preserving normal WireGuard, `/var/lib/wgtools`, certificates and remote Relay tenants for reinstall/recovery.
- Added menu action **10. FULL CLEANUP** with an explicit `DELETE ALL` confirmation. It wipes WGTools state/backups, Nodes, local Relay Agent/tenant state, all WireGuard interfaces/configs on the host, the WGTools Let's Encrypt certificate and WireGuard packages; remote Relay hosts are never contacted.
- The standalone uninstaller now also stops/removes local `wgtools-relay-home-*` services so uninstalling the panel cannot leave an active home-side Relay transport behind.
- Added `scripts/full-clean.sh` as the reusable destructive cleanup implementation used by the CLI and deploy fallback script.
## v0.20.47
- Server Settings now automatically recalculates the server VPN address to the first usable address when the VPN pool is changed, matching first-run and Add Interface behavior. Manual server-address edits remain respected.
- Localized WireGuard server validation errors in the web UI, including VPN pool/address mismatch, invalid prefixes, reserved addresses, listen-port and MTU validation.
## v0.20.46
- Added direct Nodes VPN-pool publication consistency checking. If a managed WireGuard VPN pool changes while the explicit Nodes allow-list still publishes the previously observed pool, the Nodes page now reports the exact old and current pools instead of relying only on generic discovery drift.
- The direct mismatch check is migration-aware and works with v0.20.44/v0.20.45 state, while deliberate omission of a VPN pool without a stale previously published pool does not trigger a false warning.
- Node Settings now shows only networks that are actually detected at the moment in the “Currently detected” helper; remembered/stale published networks remain in the editable allow-list but are no longer mislabeled as currently detected.
## v0.20.45
- Fixed Nodes network-change detection after a managed WireGuard VPN pool changes (for example `10.0.1.0/24` to `10.0.2.0/24`). Configured WireGuard interfaces are no longer misclassified as directly routed LAN candidates.
- Nodes now stores separate user-confirmed baselines for automatically discovered WireGuard/Site-to-Site networks and directly routed LANs, while retaining a compatibility fallback for v0.20.44 state.
- Server → Nodes now highlights stale publication state with a **Review networks** badge and warning; Node Settings also highlights the published-network field until the administrator reviews and saves the allow-list.
## v0.20.44
- Added authoritative Nodes network-conflict protection. Pairing and publication changes are rejected when a selected network overlaps the Nodes transport network or a network already published by another Node; the one-time join code is not consumed by a conflict.
- Nodes now remembers the locally detected network set when the publication allow-list is saved. If a VPN pool, Site-to-Site network or directly routed LAN later changes, Server → Nodes shows a warning with newly detected and no-longer-detected networks instead of silently rewriting the allow-list.
- Node settings remain explicit: the warning is cleared after the administrator reviews/saves the published networks; remote HUB validation remains authoritative for Spoke changes.
- Replaced the personal test-domain example in the Russian Nodes UI with the neutral documentation endpoint `vpn.example.com`.
- Updated Help to explain unique/non-overlapping Node networks, conflict blocking and network-change warnings.
## v0.20.43
- Reworked built-in HTTPS setup into an explicit guided sequence: certificate first, HTTPS enable second.
- The **Enable built-in HTTPS** checkbox stays disabled until a valid certificate exists for the currently entered domain/public IP; changing the target or using an expired certificate disables activation again.
- **Obtain / renew certificate** now also saves the entered HTTPS settings while HTTPS is disabled, so failed issuance does not discard the form values.
- Added localized Russian/English guidance and client-side handling for missing, expired or mismatched certificates instead of exposing the previous English helper error in the Russian UI.
- Updated Help to document the new certificate → enable → save workflow.
## v0.20.42
- Polished public-release UI copy: removed implementation details, roadmap/test wording and redundant helper text from Nodes, raw config, Mail, Telegram and HTTPS screens.
- Reworked built-in Help as a beginner-friendly user guide with practical examples and plain-language explanations of VPN pools, routes, NAT, Site-to-Site, Nodes, VPS Relay, client policies, backups, HTTPS, Telegram and updates.
- Moved VPS Relay documentation into the Server help section so Help navigation now mirrors the main WGTools structure: Dashboard, Server, Clients and Settings.
- Added a dedicated Nodes guide, including HUB/connected-node roles, published-network allow-lists and a practical two-site example.
## v0.20.41
- Removed the standalone sidebar `<`/`>` collapse control. Sidebar collapse is now an Appearance preference under Settings → General: **Collapse sidebar** (RU: **Свернуть панель**). The existing local browser preference is preserved, so upgrades keep the user's current sidebar state.
## v0.20.40
- Speed up Server page loading with a dedicated lightweight snapshot that skips client metadata, traffic persistence, metrics, diagnostics and backup scans while retaining live WireGuard state, routing and firewall data.
- Fix deploy hanging at `[8/8] Running helper self-test...` after v0.20.39 by explicitly providing the snapshot view JSON on stdin; bound installer helper smoke tests with timeouts so deployment cannot wait forever.
## 0.20.39
- Optimized initial loading and periodic refresh of **Clients** and **Dashboard** with page-specific snapshots. Clients no longer waits for host metrics, diagnostics, route/firewall descriptions or backup scans that are not used by that page.
- Dashboard no longer blocks first paint on full server diagnostics. The peer/traffic/resource snapshot renders first, while the diagnostic strip refreshes independently in the background.
- Interface inventory and the current-page snapshot now load in parallel instead of serially during page startup, reducing navigation latency across Dashboard and Clients.
- Snapshot generation reads client metadata and group definitions once per request instead of reopening the same files for each peer/group calculation. Historical last-seen merge now uses one SQLite session for all offline peers instead of reconnecting per peer.
- Added a lightweight peer-summary snapshot for background Nodes synchronization and WireGuard connection audit so those periodic workers no longer build a full management snapshot and compete with interactive page loads.
- The standalone diagnostics action now runs diagnostics directly rather than first constructing a full snapshot with metrics, client expansion, backups and server-management data.
## 0.20.38
- Speed up Server → Nodes status loading by collecting WireGuard interface inventory and directly-routed LAN candidates once per request instead of repeatedly through topology/local-summary/export calculations.
- Opening the Nodes tab no longer snapshots all local WireGuard clients; client inventory continues to refresh through pairing/background Node synchronization where it is actually needed.
- HUB status rendering reuses one local summary for conflict/topology calculations, removing duplicate privileged helper calls while keeping live tunnel/service state checks.
## 0.20.37
- Added a compact quick search to the read-only client table in **Server → Nodes → Details**, matching the Dashboard/Clients search control. It filters the currently displayed remote clients instantly by the visible row data (name, interface, VPN address, type and handshake text) and includes the same one-click clear control.
- Clarified the HTTPS-port behaviour found during testing: WGTools checks whether the port is locally usable on the WGTools host. A reverse proxy running on another LAN host does not occupy that host-local port; an occupied port reported with a process name (for example `nginx` on TCP 80) is a listener on the WGTools host itself.
## 0.20.36
- Simplified the three configured-Nodes action buttons to **Settings / Synchronize / Disconnect** (RU: **Настройки / Синхронизировать / Отключить**) so all three remain compact single-line actions. The Node Settings modal title remains unchanged.
- HTTPS port detection now also inspects legacy `iptables-save`/`ip6tables-save` DNAT/REDIRECT rules and performs a last-resort TCP probe against the host's own addresses. This catches Nginx Proxy Manager/container published ports that are reachable but invisible to `ss`, Docker/Podman metadata or the native nftables view.
## 0.20.35
- Node published-network text areas now resize vertically only, preventing the Node settings modal from being stretched horizontally.
- Renamed the Nodes action to **Synchronize nodes** / **Синхронизировать узлы** and sized it consistently with the neighbouring two-line Node action buttons.
- HTTPS port checks now detect container-published TCP ports (Docker/Podman) even when userland-proxy is disabled and no host LISTEN socket appears in `ss`. Added an nftables DNAT/redirect fallback, fixing false **Free** reports for ports such as TCP 443 already published by Nginx Proxy Manager.
- HTTPS status now labels a busy port as WGTools only when the listener is actually the WGTools Python/Uvicorn socket, rather than assuming every occupied configured HTTPS port belongs to WGTools.
## 0.20.34
- Nodes publication is now an explicit per-node allow-list. The HUB-enable and Connect-to-HUB dialogs are pre-filled with every currently detected candidate network; remove any line that should not be advertised to the Nodes fabric.
- The publication picker includes WireGuard VPN pools, configured Site-to-Site remote networks (including offline peers), and conservatively detected directly-routed private LANs. The Nodes transport network and common container/virtual bridge routes are excluded from LAN auto-detection.
- Newly discovered networks after pairing are shown as available in Node settings but are not silently published. Add them explicitly when they should become reachable from other Nodes.
- Existing Nodes created before v0.20.34 keep their previous automatic-export behaviour until Node settings are saved, avoiding a surprise routing change during upgrade.
- Fixed Nodes modal operation-status spacing so progress/error messages no longer crowd or overlap the helper text below the network field.
## 0.20.33
- Fixed Nodes HUB control service on panels using built-in HTTPS with a private access path. The private-path deployment mounts the WGTools FastAPI app below an outer application; mounted sub-application startup hooks were not being run, so background services (including the Nodes TCP pairing listener) could remain stopped even though the web UI and `wgnode0` worked.
- The outer private-path application now starts the same guarded background workers as normal HTTP mode: metrics sampling, update checks, WireGuard connection audit, Nodes sync and the Nodes TCP control service.
- Enabling HUB mode explicitly ensures the Node-control worker is alive, and the control loop now survives transient database/certificate/socket errors instead of silently dying. This makes HUB/Spoke role changes recover without requiring a full WGTools process restart.
## 0.20.32
- Nodes now automatically publishes every configured Site-to-Site peer remote network in addition to each local WireGuard VPN pool. Publication is configuration-driven rather than handshake-driven, so an offline Site-to-Site peer (for example `10.10.5.0/24`) remains in the topology and becomes reachable again without route churn when it reconnects.
- Adding, editing or deleting a WGTools client, applying raw WireGuard config, or changing/creating/deleting a WireGuard interface now reconciles the Nodes tunnel automatically. New Site-to-Site networks therefore propagate on the next Nodes sync without a manual **Sync now** step.
- Added automatic return-path NAT for ordinary WireGuard clients of remote Nodes. A remote Node VPN pool (for example `10.0.7.0/24`) is MASQUERADEd only when accessing a network published by the receiving Node, so LAN routers do not need routes back to every remote client pool.
- Remote Site-to-Site/custom LAN sources are intentionally not NATed by the client return-path rule; routed inter-site traffic keeps its original source address. The new rules live in a separately managed `WGTOOLS-NODES-CLIENT-NAT` chain and are rebuilt with `wgnode0` to avoid stale entries.
- Node details now identify automatically discovered Site-to-Site exports as **Site-to-site network**.
## 0.20.31
- Fixed Node-originated access to networks published by a WGTools node. Traffic from the internal Nodes transport network (for example `10.254.240.0/24`) is now automatically MASQUERADEd only when it exits toward a network published by the local WGTools instance, so LAN routers do not need a manual return route to `wgnode0`.
- The new NAT is source-scoped to the Nodes transport network and destination-scoped to local published networks. WGTools keeps it in the dedicated `WGTOOLS-NODES-NAT` chain, rebuilt with `wgnode0` so removed exports cannot leave stale rules behind. Ordinary LAN-to-LAN/site-to-site traffic keeps its original source address and is not NATed by this fix.
- This resolves the validated v0.20.30 case where the Node tunnel and routes were healthy, but ping from a remote Node transport IP reached the destination LAN and the reply could not return.
## 0.20.30
- Reworked **Server → Nodes** pairing architecture from the v0.20.29 prototype. Nodes no longer use the WGTools web panel URL, HTTP/HTTPS scheme, web port, certificate or private panel path for pairing or steady-state synchronization.
- HUB now uses the same numeric Nodes port for two independent transports: **UDP** for WireGuard `wgnode0` and a dedicated pinned-TLS **TCP** control socket for initial pairing. If the HUB is behind NAT, forward that port for both TCP and UDP.
- Spoke setup is reduced to **Node name + HUB `host:port` + one-time connection code + additional networks**. The HUB hostname entered by the Spoke is also used as the WireGuard endpoint, so HUB setup no longer needs a separate public hostname field.
- One-time connection codes now embed the HUB control-certificate SHA-256 fingerprint. The Spoke pins that identity before sending the one-time secret, avoiding any dependency on the web-panel TLS certificate.
- After `wgnode0` is established, topology/status/version/read-only-client synchronization moves to the HUB transport address inside the WireGuard tunnel. Normal sync and leave requests are accepted only from the paired Node transport IP.
- The optional **Panel URL** remains only in Node settings as informational metadata for the **Open panel** button; changing HTTP/HTTPS, web port, hostname, certificate or private path no longer affects Nodes.
- Preserved the HUB control identity inside SQLite so full WGTools `.wgtbackup` migration/restore keeps existing Spoke trust. Failed local tunnel creation also revokes the just-created HUB peer through the pinned pairing channel when possible.
- Fixed the Nodes connection-code UI on dark theme and added a Clipboard API fallback so **Copy** works on ordinary HTTP/LAN panels where the modern clipboard API may be unavailable.
## 0.20.29
- Added the first test version of **Server → Nodes**. Any WGTools installation can become a HUB; other WGTools panels pair to it with a one-time 15-minute code and establish a dedicated hidden `wgnode0` WireGuard transport.
- WGTools Nodes automatically publishes the VPN pools of local WGTools-managed interfaces and can additionally publish explicitly configured routed LAN/other IPv4 networks. The HUB distributes the topology and WGTools adds the corresponding routes, including routes in local numeric policy-routing tables used by WGTools interfaces.
- Added Hub-and-Spoke routing between connected panels, automatic conflict detection for overlapping published networks, per-node tunnel status/version/network/client counts, a read-only remote-client details dialog and an optional **Open panel** link. Remote private keys, PSKs, users and client-management actions are never shared.
- The initial Nodes test deliberately uses a simple trust model: all non-conflicting published networks are reachable by all connected nodes. Granular inter-node ACLs and remote administration are not part of this version.
- Node pairing/synchronization uses the configured HUB panel HTTP/HTTPS URL while WireGuard data traffic uses the separate `wgnode0` tunnel. A spoke now removes its HUB peer on clean disconnect; failed pairing/config changes roll back instead of leaving ghost topology state.
- Reserved `wgnode*` interfaces as internal WGTools transports so they do not appear as normal server interfaces. Normal WGTools uninstall removes the internal Node tunnel while preserving user WireGuard interfaces.
- Fixed the `wgtools` terminal console to discover and display the actual normal WireGuard interfaces instead of assuming stale `wg0`. A server with only `wg1` now shows/restarts `wg1`; internal `wgrly*`/`wgnode*` transports remain separate/hidden.
## 0.20.28
- Fixed the last race during live built-in HTTPS changes. After saving a new HTTPS port or private panel path, the browser now waits for the restarted WGTools process to become healthy at the exact new HTTPS URL before navigating, instead of relying on a fixed delay that could briefly hit the old route (404) or a half-open TLS listener (`PR_END_OF_FILE_ERROR`).
- `/healthz` now exposes a per-process non-sensitive instance token and CORS only on that readiness endpoint, allowing a page on the old HTTPS port to verify that a genuinely new WGTools process is ready on the new port/path. The rest of the hidden-path surface remains unchanged.
## 0.20.27
- Added a compact `wgtools` terminal console for remote administration. It shows WGTools/WireGuard/Telegram/timer states, the exact current panel URL and private HTTPS path, certificate expiry, and provides panel start/stop/restart, WireGuard restart, log viewing and an HTTP rescue action.
- Settings → HTTPS now has the same compact panel-address action used by client creation, so the current browser hostname/IP can be inserted without typing it manually.
- Hardened live HTTPS port/path changes: the service restart is delayed long enough for the API response to flush, the browser uses a keepalive request, and the UI reconnects explicitly to the requested HTTPS scheme/port/path instead of remaining on the old origin if the socket is interrupted during the switch. A guarded systemd hand-off verifies the new local health endpoint and automatically restores the previous web settings if WGTools fails to start after the change.
- The installer now exposes `wgtools` in `/usr/local/bin`; update validation/rollback and uninstall handling include the console command.
## 0.20.26
- Built-in HTTPS can now listen on a user-selected TCP port instead of being fixed to `443`; port `80` remains reserved for Let’s Encrypt HTTP-01 validation.
- Added a required user-defined **Panel access path** for built-in HTTPS, for example `/MyPrivateWGToolsPath/`. When HTTPS is enabled, the WGTools application, API and static files exist only below this prefix; direct requests to `/`, `/login`, `/api`, `/static`, etc. return `404`.
- The configured path is preserved across WGTools restarts/updates and can be changed later from Settings → HTTPS. Authentication remains mandatory; the path is an additional scanner-noise reduction layer, not a replacement for credentials.
- Updated redirects, authentication flows, static assets and browser API requests so every WGTools function works correctly below the HTTPS path prefix.
- HTTPS port checks now validate TCP `80` plus the selected panel port and continue to leave unrelated listeners untouched.
## 0.20.25
- Reorganized the first WireGuard server setup grid so **Interface / Listen port** are paired on the first row and **Display name / MTU** on the second, reducing unused horizontal space.
- Client creation keeps the server address field empty but adds a compact globe action that inserts the current panel hostname/IP from the browser URL; endpoint history/manual entry remain available.
- Added **Settings → HTTPS** with direct Uvicorn TLS on TCP 443 — no bundled Nginx/reverse proxy. WGTools can request Let’s Encrypt certificates for a domain or public IP using Certbot standalone validation.
- Added local TCP 80/443 conflict checks. WGTools never stops or overwrites an unrelated listener; TCP 80 must be reachable from the Internet for ACME issuance/renewal.
- Added automatic certificate renewal through a dedicated systemd timer and reload hook. IP certificates use Let’s Encrypt’s required short-lived profile.
- The HTTPS tab shows certificate expiry, Certbot/renewal status and copyable `fullchain.pem` / `privkey.pem` paths. Built-in HTTPS can be disabled to return WGTools to HTTP when an external reverse proxy is preferred.
- Updated install/update/rollback/uninstall plumbing so HTTPS state survives WGTools application updates while Let’s Encrypt certificate files remain independent under `/etc/letsencrypt`.
## 0.20.24
- Reorganized **Settings → Mail** into a clearer two-column flow: SMTP server + encryption, port + sender name, SMTP login + password, with the test recipient kept as a single half-width field below.
- The sender e-mail is now taken from the SMTP login in the web UI, removing the duplicate sender-address field. The backend keeps compatibility with previously saved sender addresses.
- Changing SMTP encryption now automatically proposes the conventional port: STARTTLS → 587, TLS/SSL → 465, no encryption → 25. Custom ports can still be entered afterward.
## 0.20.23
- Fixed the password-recovery form in Firefox: after a reset code was successfully mailed, the UI now advances to the code/new-password step instead of showing `event.currentTarget is null`.
- Password-reset and SMTP test emails now use the language selected in WGTools instead of combining Russian and English in one message.
## 0.20.22
- Added **Settings → Mail** with SMTP server/port, STARTTLS/TLS/plain modes, optional SMTP authentication, sender identity, masked saved-password handling and test delivery. Mail can be enabled independently and the saved SMTP password can be removed without exposing it back to the browser.
- Added optional per-user **E-mail** addresses, including first-user setup, user creation and later editing. E-mail addresses are unique when present and are included in the full SQLite-backed `.wgtbackup`.
- Added self-service **Forgot password?** recovery on the login screen when Mail is enabled: users request a one-time 6-digit code by username or e-mail, then set a new password. Codes are salted PBKDF2 hashes, expire after 15 minutes, are one-time use, allow five attempts and are rate-limited.
- Password-recovery requests always return the same public response whether an account/e-mail exists or not, preventing username/e-mail enumeration.
- Added **Send reset** to Settings → Users so an authenticated administrator can send a recovery code to a user's registered e-mail.
- Password changes and successful recovery increment a per-user session version, invalidating older web sessions for that user. Sessions created before this feature are upgraded safely only until the account has changed credentials.
- Extended Audit with password-recovery, mail-settings/test and user-email/reset events. Failed logins now include the connecting IP in the Audit object; reset codes, SMTP passwords and other secrets are never logged.
- Password-reset rate counters are updated transactionally, and rate-limited public requests are not allowed to flood the Audit journal.
## 0.20.21
- Polished the Telegram **Server** submenu: removed the mixed emoji/glyph icons from Start/Restart/Stop and kept the controls as plain localized text.
- Applied native Telegram inline-button styles where supported: **Start** uses `success` (green), **Restart** uses `primary` (blue), and **Stop** uses `danger` (red). The **Menu** button remains in the normal Telegram style.
## 0.20.20
- Simplified the Telegram main menu: the top row is now split into **Interface** and **Server**, while WireGuard Start/Restart/Stop controls move into the dedicated Server submenu instead of occupying a permanent bottom row.
- Replaced the old button-only emoji controls with compact text actions (`▶ Start`, `↻ Restart`, `■ Stop`; localized in Russian) so the server controls are immediately understandable.
- Server control confirmations, success messages and errors now return to the Server submenu rather than unexpectedly jumping back to the main menu, keeping Telegram navigation consistently step-based.
## 0.20.19
- Reduced the compact sidebar rail from 70 px to 56 px so icon-only navigation gives the content area more room on small displays.
- Replaced the previous collapse/expand glyph with a simple `<` / `>` control: `<` collapses the expanded sidebar and `>` expands the compact rail.
## 0.20.18
- Reworked the main sidebar with clean line icons for Dashboard, Server, Clients and Settings.
- Added a persistent manual compact mode: the sidebar collapses to an icon-only rail and the content area expands; the choice is stored in the browser. On narrow screens the compact rail is used automatically so navigation remains available without consuming the full width.
- Replaced the old two-line footer version label with a compact WGTools logo + `WGTools - vX.Y.Z` GitHub link. The update-available notice also adapts to the compact sidebar.
## 0.20.17
- Fixed Dashboard **Traffic → Reset**. The API route and privileged helper already supported `traffic_reset`, but the web application's helper-action allowlist did not, so the request was rejected before reaching the helper with `Unsupported helper action: traffic_reset`.
- Added a regression test that keeps the web helper wrapper and privileged helper action lists aligned for traffic reset.
## 0.20.16
- Consolidated web client-config Audit events: opening the combined config + QR modal now produces one `client.config_viewed` row instead of separate config and QR rows. Existing historical `client.qr_viewed` rows remain readable.
- Telegram **Configs → client** re-issue now records the same `client.config_viewed` Audit action with Telegram actor identity, interface/client context and filename after both `.conf` and QR are delivered. No config, key or QR contents are stored.
- Telegram config re-issue failures now use the existing redacted failure Audit path while keeping the user inside the Configs flow.
## 0.20.15
- Added a small breathing gap below the client-editor operation/status banner so progress and result messages no longer visually merge with the fixed modal action bar.
- The spacing is applied only while the status banner is visible, so the normal client editor layout is unchanged when there is no operation message.
## 0.20.14
- Fixed client key rotation while the client is currently connected. Rotating credentials already replaces the old runtime WireGuard peer immediately; the UI now treats that disconnect as the expected result instead of turning a post-rotation refresh failure into a false `NetworkError`.
- The client editor reports rotation success before refreshing live state, and the follow-up snapshot refresh is best-effort so it cannot overwrite a completed rotation.
- Rotation confirmation/status text now explicitly says that an active client session will be forcibly disconnected and that the old config becomes invalid.
- Added a clear recovery message for the special case where the WGTools panel itself is being accessed through the client whose credentials are being rotated.
## 0.20.13
- Added per-client VPN peer isolation for WGTools-managed normal clients. Isolation is symmetric inside the WireGuard address pool and leaves server/LAN/Internet/Site-to-site access to the existing policies.
- Replaced separate PSK and client key-pair rotation controls with one **Rotate keys** action. It always regenerates PrivateKey/PublicKey and also rotates PSK when PSK is enabled.
- Preserved client address, routes, group/policies, schedule/expiration, isolation, durable last-seen and traffic counters across key rotation.
- Added Audit event `client.credentials_rotated` without storing key material.
## 0.20.12
- Added optional per-interface **MTU** to first server setup, Add WireGuard Interface and Server Settings. Empty/0 keeps wg-quick automatic MTU; explicit values are validated and written as the standard `MTU = ...` interface directive.
- Added safe **client key-pair rotation** for WGTools-managed clients. A new PrivateKey/PublicKey replaces only that peer while preserving its VPN address, routes, policies, group, PSK, expiration/schedule settings, durable last-seen state and accumulated traffic.
- Client key rotation is transactional with the existing WireGuard config backup/rollback path. The old client config becomes invalid immediately and WGTools requires a newly issued `.conf`/QR.
- Added Audit event `client.keys_rotated` without storing key material.
- Added regression tests for MTU parsing/validation/config generation and managed-client key rotation state migration.
## 0.20.11
- Reworked Telegram Bot navigation so each action returns to its logical parent screen instead of unexpectedly jumping to the main menu.
- Config/QR re-issue now retires the old picker, sends the `.conf` and QR, then places a fresh client-config picker **below** the files; the next actionable buttons are therefore always at the bottom of the conversation.
- Legacy/unavailable config selections stay inside the Configs screen, including useful error text, instead of replacing the flow with the main menu.
- Delete confirmation **No** now returns one step to the delete-client list; successful deletion and deletion errors also return to the refreshed delete list, with the removed client gone.
- Stale interface/group selections now keep the user in their respective picker with a useful message. Existing create flow still finishes with a fresh main menu below generated client files.
- Added Telegram navigation regression tests covering config delivery order, the existing create-flow bottom menu, legacy config selection and delete-flow parent navigation.
- Cyrillic client names now produce readable portable config filenames via transliteration instead of falling back to `wireguard-client.conf`; web and Telegram re-issue use the same generated filename.
## 0.20.10
- Reworked the automatic configuration-backup card so its stored-count / last-backup block sits below the retention control at full card width; the timestamp is kept on one line instead of wrapping in the narrow right-hand column.
- Audit now refreshes automatically while its modal is open, using the saved **Settings → General → Status refresh interval** value (2–60 seconds). The existing background prefetch remains, and manual Refresh still forces an immediate fresh request.
## 0.20.9
- Prefetch the Audit journal in the background when Settings loads, so opening **Audit** normally renders the already-fetched rows immediately instead of showing a visible loading pause first. Manual Refresh still requests fresh data.
- Shortened the automatic-backup status badge to **Enabled / Включено** and forced the pill to stay on one line in the compact backup card.
## 0.20.8
- Matched the height of the two **Settings → Backups** cards on wide screens so the automatic configuration-backup card now aligns with the full migration/restore card instead of ending early.
- The **Save** action in the configuration-backup card stays anchored at the bottom of the equal-height card; narrow-screen stacked layout remains unchanged.
## 0.20.7
- Reorganized Settings into persistent tabs matching the Server page: General, Backups, Telegram, Users and About. The Audit button remains a separate top-level tool.
- Split backup controls into two independent cards shown side by side on wide screens: automatic configuration backups and full migration/restore backups; they stack vertically on narrower displays.
- Settings tabs remember the last section for the browser session and support direct URL hashes such as `/settings#about`; the update notification therefore still opens About directly.
## 0.20.6
- Added durable lifetime WireGuard traffic accounting. Per-client RX/TX and the Dashboard Traffic total now survive WireGuard interface restarts, WGTools restarts and host reboots instead of following resettable runtime counters from `wg show`.
- The Dashboard Traffic card now includes traffic from clients that were later deleted, so the interface total represents all traffic since the last manual reset.
- Added a compact gray **Reset** button to the Traffic card. Resetting establishes the current WireGuard runtime counters as a new baseline and starts both the interface and current client totals from zero without restarting WireGuard.
- Traffic resets are recorded in Audit. Existing historical bytes that were already lost before upgrading to v0.20.6 cannot be reconstructed; the durable counter starts from the runtime values available at first v0.20.6 sampling.
- Added regression tests for accumulation across runtime counter resets, stopped interfaces, deleted clients and manual reset baselines.
## 0.20.5
- Fixed a regression in the Audit renderer introduced by the v0.20.4 layout change: the row color tone is now calculated for each audit item before rendering, eliminating the `tone is not defined` error and restoring all Audit rows.
- Kept the wider desktop Audit dialog, compact `ТГ` / `TG` Telegram actor labels, fixed responsive columns and existing search behavior from v0.20.4.
## 0.20.4
- Improved the Audit modal layout to avoid unnecessary horizontal scrolling on normal desktop widths: the dialog is slightly wider, the table uses a fixed responsive column layout, and long cell content is clipped cleanly instead of expanding the table.
- Compact Telegram actors are now displayed as `ТГ · @username · ID ...` in Russian and `TG · @username · ID ...` in English. The stored audit actor remains unchanged, preserving existing history and search compatibility; hovering the actor badge still exposes the original full value.
- Audit quick search matches both the original stored Telegram actor and the compact localized display form.
## 0.20.3
- Preserved each WireGuard peer's last successful handshake independently from the current runtime interface state. After a host/interface restart, Clients and Dashboard now show the real historical last connection instead of `Never`; `Never` is reserved for peers that truly never connected.
- Fixed durable last-seen pruning: a configured peer with runtime handshake `0` no longer loses its saved connection state. Existing installations affected by the old behavior can recover a recent last-seen value once from the 30-day Audit connection history, then keep it in durable state outside Audit retention.
- Completed the update Audit lifecycle. Background updates now record the pre-update full `.wgtbackup`, successful completion, useful update errors, successful rollback, and rollback failure without storing secrets.
- Added regression tests for last-seen persistence and migration from existing Audit connection history.
## 0.20.2
- Renamed **Settings → Logs / Audit log** to the clearer **Audit / Аудит** label while keeping the existing searchable audit modal and retention rules.
- Added Telegram Bot state-change auditing to the same SQLite journal used by the web panel. Telegram audit actors always include the numeric Telegram user ID and include `@username` when Telegram provides it.
- Telegram client creation/deletion and WireGuard Start/Stop/Restart now record success events with interface/client context without storing generated client configuration, keys or PSKs.
- Added audit coverage for Telegram-side persistent endpoint changes, useful failed administrative operations and denied state-changing attempts; menu navigation, status/client-list views and config re-issue remain intentionally silent.
- Hardened audit text redaction so token/key-like values in error text are scrubbed before storage in addition to the existing secret-field redaction.
- Added focused regression tests proving Telegram client create/delete produces the expected actor/action events, read-only navigation stays quiet, denied mutation is logged and secret-like failure text is redacted.
- Updated built-in help and EN/RU README documentation for Audit and Telegram auditing.
- Reorganized the README uninstall section into three clear paths: the safe WGTools-only uninstall remains visible, while destructive full WGTools+WireGuard and full dedicated VPS Relay cleanup commands are placed under collapsible spoilers.
## 0.20.1
- Local hotfix build prepared for testing; not published to GitHub.
- Fixed the sidebar update notice so a discovered newer release persists while navigating between Dashboard, Server, Clients and Settings, then disappears after a successful update or when WGTools is already current.
- Allowed the `update_notice` helper action in the web helper allow-list so `/api/update/notice` can return the cached release state instead of falling back to “no update”.
- Made the update flow explicitly show that WGTools creates an automatic full `.wgtbackup` before installing an update. The existing pre-update full backup and application rollback archive are preserved.
- Reduced false Telegram Bot test failures: if the direct `getMe` check times out with a TLS/timeout-style network error while the running bot has contacted Telegram recently, Settings reports the bot as working.
- Added a SQLite-backed audit log for panel activity with timestamp, username, action, object and result. Secret-bearing fields such as passwords, private keys, PSKs, Telegram tokens, `control_token` and SSH credentials are redacted.
- Added **Settings → Logs / Audit log** as a dedicated modal with quick search, localized event labels, color-coded action/result accents and a manual refresh button.
- Audit events are retained for 30 days with a 10,000-row safety cap.
- Added WireGuard client connection history to the audit log: WGTools records the client name, time and endpoint IP on the first active connection after a meaningful offline gap or when the endpoint IP changes, without logging every routine handshake or writing private configuration or keys.
## 0.20.0
- Changed first-run WireGuard defaults to `wg0 = 10.0.0.0/24` with server address `10.0.0.1/24`; the next interface now naturally continues as `wg1 = 10.0.1.0/24`.
- VPS preflight now reports both the number of saved Relay tenants and the number currently active by recent protected-transport handshake, avoiding the ambiguous old “N connections” label.
- Made VPS working/error/success message spacing symmetrical: the top and bottom gaps now use the same compact spacing.
- Rewrote the English and Russian README for the current feature set, explicitly documenting Debian and Ubuntu support, multi-interface management, client groups/policies, schedules/expiration, VPS Relay behavior, backups, periodic release discovery and safe updates.
- Replaced public README screenshots with the current UI and moved all screenshots under collapsible `<details>` sections.
- Added explicit destructive full-cleanup commands for both a dedicated WGTools host and a VPS Relay host, including optional WireGuard package removal.
- Updated privacy/security documentation for the six-hour cached background GitHub Release metadata check; application updates remain strictly opt-in.
## 0.19.15
- Fixed VPS wizard status spacing at the actual root cause: the shared JavaScript status helper no longer overwrites an element's complete `className`, so structural classes such as `vps-operation-status` and `migration-status` survive while working/error/success states change.
- VPS working/error/success messages now keep a deliberate gap below the Home ↔ VPS transport-port hint and a compact gap before the compatibility card.
- Added **Display name** to the first WireGuard server creation form (`wg0` on a clean install), matching the friendly-name capability already available when adding later interfaces.
## 0.19.14
- Hid WGTools internal Relay transport interfaces (`wgrly*`) from the global WireGuard interface switcher and Server interface manager; they are implementation details of Home ↔ VPS Relay transport, not user-managed WireGuard servers.
- A stale browser cookie that previously selected a `wgrly*` interface now falls back automatically to the normal configured interface (typically `wg0`) instead of opening an empty “Not configured” Server view.
- Reserved the `wgrly*` namespace so user-facing interface create/rename/delete/helper actions cannot accidentally target or create a name that conflicts with Relay transport.
- Kept the internal transport visible only where it is useful: an installed VPS row now shows its `wgrly*` transport name alongside the published WireGuard interface and Home ↔ VPS transport addresses.
## 0.19.13
- Fixed client create/update/delete when another WGTools-managed policy is currently blocked: the live iptables parser now accepts the canonical form emitted by `iptables -S`, including an omitted `-d 0.0.0.0/0` and the default `--reject-with icmp-port-unreachable` added to REJECT rules.
- Runtime policy reconciliation now removes the exact live WGTools-tagged rule returned by iptables before rebuilding the desired policy set, so stale/duplicate managed rules are healed without blocking further client changes.
- Kept strict validation for unexpected WGTools-tagged firewall shapes; unknown extra matches/options are still rejected instead of being silently rewritten.
## 0.19.12
- Refined the VPS wizard operation-status spacing so working/success/error messages sit cleanly below the Home ↔ VPS transport-port hint with a tighter, balanced gap before the compatibility card.
- Expanded built-in RU/EN help with the current multi-interface, client policy/group, VPS Relay, Relay reconnect/disaster-recovery, backup and update workflows; moved raw-config guidance to Server → Config.
- Made full migration-backup coverage of VPS Relay state explicit: the SQLite backup carries controller/tenant identity, management token and home transport key used to reconnect to a preserved remote tenant; the backup manifest now reports saved Relay records.
- Added periodic update discovery: WGTools refreshes stable GitHub Release metadata in the background with a six-hour cache.
- Added a prominent sidebar update notice with the available version; clicking it opens Settings → About, where cached release details and the existing safe one-click updater are shown.
## 0.19.11
- Fixed reconnecting a preserved VPS Relay when the home WireGuard ListenPort differs from the value stored in the remote tenant: WGTools now synchronizes the existing tenant to the current port instead of rejecting it or creating a new tenant.
- Reconnect still reuses the original Relay tenant, UDP Relay/transport ports, controller identity and client `relay_vps_id`.
- Moved VPS operation/error messages back directly below the public endpoint fields, with extra spacing so they no longer cover the Home ↔ VPS transport-port hint.
## 0.19.10
- Fixed the VPS Relay install/reconnect button crash caused by the undefined `vpsCredentials` JavaScript reference.
- **Remove VPS** now detaches only the local transport and keeps a hidden local Relay identity record instead of deleting it, so adding the same VPS again reconnects to the same tenant.
- VPS preflight now recognizes an existing tenant created by the same WGTools controller and reuses its original Relay/transport UDP ports instead of allocating a second connection.
- Added recovery for VPS entries already removed by v0.19.9: WGTools can reclaim the preserved remote tenant over SSH, rotate only the home-side transport peer key when necessary, and reuse an orphaned client `relay_vps_id` so existing Relay clients reconnect without being recreated.
- The VPS wizard clearly reports when an existing Relay will be reconnected and changes the action to **Reconnect Relay / Подключить Relay**.
- Moved VPS operation/error messages below the compatibility result card for a cleaner wizard layout.
## 0.19.9
- Added **Remove VPS** for installed Relay entries. The action detaches the VPS from the current WGTools instance, stops/removes only the local home-side Relay transport, and removes the local database record.
- Removing an installed VPS never connects to or deletes anything on the remote VPS: the Relay Agent, tenant, transport configuration, keys and management token are intentionally preserved for disaster recovery.
- Added an explicit confirmation warning that clients using the removed Relay will stop connecting through it until they are reconfigured or WGTools state is restored.
- Restoring a WGTools migration backup now reconciles installed Relay records from the restored SQLite state and recreates a missing home-side transport using the original tenant identity/keys, allowing WGTools to reconnect to the preserved VPS Relay instead of provisioning a new tenant.
## 0.19.8
- Simplified VPS onboarding: after a successful SSH/preflight check the same wizard proceeds directly to Relay installation; the old visible “Save candidate” step is no longer part of the normal flow.
- Added the first real client-over-Relay path. When at least one installed Relay exists for the selected WireGuard interface, managed clients can choose **Directly to WGTools** or **VPS Relay** in the Configuration tab.
- Relay Endpoint is generated automatically from the selected VPS domain/IP and Relay UDP port; manual server endpoint fields become read-only while Relay mode is selected.
- Generated client configs/QR codes resolve the current Relay endpoint from WGTools state so the client profile is pointed at the VPS without changing the real server WireGuard peer.
- Relay controls stay completely hidden from client editing when no installed Relay exists for the active WireGuard interface.
- Clients using Relay show a compact Relay marker/name in the Clients list and are searchable by Relay endpoint/name.
- This stage intentionally keeps Internet egress on the home WGTools server; VPS Internet egress will be layered on only after the transparent client → VPS → Home path is validated on the test server.
## 0.19.7
- Added the first installable WGTools VPS Relay Agent stage.
- Added a protected per-controller WireGuard transport tunnel between WGTools and VPS.
- Relay Agent is multi-tenant: one VPS can host independent isolated connections for multiple WGTools controllers.
- Existing Relay tenants are never overwritten when another WGTools connects to the same VPS; free UDP ports are selected automatically.
- Added Relay health checks over the protected management tunnel.
- VPS SSH credentials remain ephemeral and are requested again only for installation.
- Added SSH host-key pinning between preflight and installation.
- Test deploy package supports an explicit target-host override for isolated Relay development.
## 0.19.6
- Reworked **Server** into compact tabs: Interface, Routing, VPS and Config.
- Moved the raw WireGuard editor from Settings to Server -> Config.
- Added the first safe VPS Relay stage: a real read-only SSH preflight for Debian/Ubuntu compatible VPS hosts.
- VPS preflight checks SSH access, sudo/root privileges, apt/systemd/network tooling, architecture and free Relay/transport UDP ports.
- Passwords and pasted SSH private keys are used only for the current preflight request and are never stored.
- Successful checks can be saved as non-secret VPS candidates in the WGTools database; remote installation is intentionally not enabled yet.
- VPS Relay client options remain absent until a Relay is actually installed/configured in a later test build.
## v0.19.5
- Reworked Telegram Bot navigation so completed actions and confirmations always retire the old inline keyboard and return to the appropriate higher-level/main menu state.
- Fixed Telegram client deletion confirmation: after Yes the confirmation buttons are removed immediately, the peer is deleted once, and the same message returns to the main menu; repeated queued taps are handled safely.
- Hardened Telegram Start/Stop/Restart, config delivery, interface selection and client-create flows against stale inline buttons and duplicate callback presses.
- Telegram client/status lists now reflect schedule/expiration administrative blocks, and Telegram-created managed clients use PSK by default to match the web UI.
- Replaced the Clients per-column Filters UI with the same compact quick search used on Dashboard, including one-click clear. Search covers name, group, VPN address, remote networks, type, endpoint, Keepalive and current status.
## v0.19.4
- Shortened the client table handshake column label to `Handshake` in both languages.
- Rebalanced client table column widths so compact action buttons stay inside the card in Russian UI.
- Added a one-click clear button to the Dashboard quick peer search field.
## v0.19.3
- Added a compact quick-search field to the Dashboard Active peers card. Search matches peer name, VPN address, type, endpoint and status without adding the full Clients filter UI to the Dashboard.
- Replaced the long Delete action in the Clients table with a compact danger “−” button with tooltip/accessible label so all client actions stay on one row on normal desktop widths.
- Refined desktop client-table column widths and action spacing to avoid unnecessary wrapping while preserving horizontal scrolling on genuinely narrow screens.
## v0.19.2
- Enabled PSK by default for newly created WGTools-managed clients while preserving the existing setting when editing or duplicating a client.
- Added per-column client filters with a compact toggle/reset UI for name, group, VPN address, remote networks, Keepalive and status.
- Custom expiration now pre-fills the browser's current local date/time when the date-time field is first opened.
- Reworked the client access timer to evaluate on exact minute boundaries instead of a relative one-minute interval.
- Added recurring per-client access schedules with selectable weekdays and start/end times. Outside the allowed window WGTools disables the peer without changing the client config, then restores the same peer automatically when access is allowed again.
- Access schedules use the WireGuard server's local time and support overnight windows such as 22:00–06:00.
- Scheduled/expired blocks now override the online indicator so the Clients/Dashboard status does not report an administratively blocked peer as online.
- Refined security checkboxes so the control stays left-aligned with its label instead of being stretched by the two-column form grid.
- Stabilized the Clients table/filter layout on desktop: opening and closing filters no longer leaves a stray horizontal scrollbar, while narrower screens keep normal horizontal scrolling.
## v0.19.1
- Fixed tabbed-client validation: browser-native hidden-field validation no longer blocks the WGTools validator, so Save now opens the exact tab containing the missing required field and focuses it.
- Restored the post-create flow: after a managed client is created successfully, WGTools immediately opens its generated `.conf` and QR code.
- Added an expiration action for temporary normal clients. By default an expired client is deleted as before; administrators can instead keep the client and automatically disable its WireGuard access.
- Kept expired-but-disabled clients visible in the Clients list with an explicit status marker. Editing the client to a future/no-expiration lifetime and saving re-enables the same peer and existing client configuration.
## v0.19.0
- Reworked the client editor into compact tabs: Basic, Policies, Configuration and Security. Validation now opens the tab containing the field that needs attention.
- Clarified client-group UX by separating **Server access policy** from the **Client configuration template**.
- Grouped clients now inherit Routes/AllowedIPs, DNS and Keepalive through an explicit configuration-source mode; inherited fields are read-only until **Override group template** is enabled.
- Existing inherited clients keep their saved configuration after a group-template change and show an explicit action to apply the current template before issuing a new config/QR.
- Added optional WireGuard `PresharedKey` support for WGTools-managed clients. PSK is generated securely, written to the server peer, stored in protected client metadata, and included in generated configs/QR codes.
- Added safe PSK rotation for existing managed clients with an explicit warning that the old installed client config stops working until a new config/QR is issued.
- Added temporary client lifetimes: no expiration, 1 hour, 3 hours, 6 hours, 1 day, or a custom local date/time. Expired peers are automatically deleted by a dedicated systemd timer, with the normal WireGuard configuration backup created first.
- Added PSK and expiration state to the Clients overview without adding more table columns.
- Preserves existing PSKs on unmanaged peers when editing other server-side peer fields, including correct parsing of an existing `PresharedKey` from the peer block.
- Fixed multi-interface policy reconciliation so updating/deleting rules on one WireGuard interface cannot remove WGTools-managed firewall rules belonging to another interface.
## v0.18.1
- Fixed the client-management JavaScript bootstrap function name so the web UI initializes correctly after loading.
- No changes to WireGuard interfaces, client groups, policies, routing, or backup format.
## v0.18.0
- Added client groups scoped to the currently selected WireGuard interface. Normal clients can belong to one group; Site-to-site peers remain separate.
- Added reusable group server policies for Internet access, local/Site-to-site access and address/network Allow/Deny exceptions.
- Added safe per-client policy overrides. Client-specific Allow/Deny exceptions take precedence over group exceptions without modifying the group itself.
- Added a fully custom client policy mode while keeping the client organizationally assigned to its group.
- Added reusable new-client defaults for route preset/AllowedIPs, DNS and PersistentKeepalive.
- New clients can inherit group defaults automatically; existing clients keep their current configuration unless an administrator explicitly applies the group defaults.
- Added a visible warning when a managed client's saved configuration differs from current group defaults, making deliberate `.conf`/QR re-issue clear.
- Added safe group deletion: clients can be unassigned or moved to another group and are never deleted with the group.
- Telegram client creation can now select an interface-scoped group and automatically uses that group's routes, DNS and Keepalive defaults.
- Group policy changes are reconciled into deterministic WGTools-managed firewall rules without restarting WireGuard.
- Portable `.wgtbackup` migration archives now use format v3 and include client-group metadata while remaining compatible with v1/v2 backups.
- Full Tunnel except local networks now keeps generated client `AllowedIPs` at `0.0.0.0/0`; the local restriction stays entirely server-side.
## v0.17.1
- Added required-field validation for managed client configuration, including the server address/domain and client AllowedIPs.
- Site-to-site remote networks are now marked required while that client type is selected.
- Added safe WireGuard interface deletion from the Server interface list. WGTools backs up the interface configuration, stops/disables the service, removes managed client metadata for that interface and switches to another remaining interface.
- The last configured WireGuard interface cannot be deleted from the interface manager; full removal remains an explicit uninstall/admin operation.
## v0.17.0
- Added multi-interface WireGuard management for `wg0`, `wg1` and additional interfaces from one WGTools installation.
- Added a global interface selector in the top bar; Dashboard, Server, Clients and raw WireGuard configuration follow the selected interface.
- Added a compact interface overview on Server with status, address, port, policy table and optional friendly display names.
- Added **Add interface** provisioning with automatic suggestions for the next interface name, non-overlapping VPN network, free WireGuard UDP port and policy-routing table when the existing topology uses policy routing.
- Added cross-interface validation to prevent overlapping VPN pools and duplicate WireGuard listen ports or policy-routing tables.
- WGTools-managed client metadata is now associated with its WireGuard interface while remaining compatible with legacy client metadata.
- Added per-user WireGuard interface selection to the Telegram bot.
- Upgraded portable migration backups to format v2 so all detected WireGuard interface configurations, interface states and friendly-name metadata are included; v1 backups remain restorable.
- Host CPU, memory and network history remains global and uses the host default uplink so switching WireGuard interfaces cannot mix different NICs in the 24-hour graph.
## v0.16.3
- Added 24-hour minimum, average and maximum summaries above the CPU and memory history graphs.
- Added separate RX and TX minimum, average and maximum rate summaries above the network history graph.
## v0.16.2
- Online peers are now highlighted with green status text and a subtle breathing green indicator on Dashboard and Clients.
- Respects the browser `prefers-reduced-motion` accessibility setting.
## v0.16.1
- Changed allowed-local-address exceptions from a resizable textarea to a single-line input.
- Full Tunnel except local networks now keeps the generated client `AllowedIPs` at `0.0.0.0/0` only.
- Added a read-only reference block showing which local and Site-to-site networks are blocked by the server-side policy.
## v0.16.0
- Added per-client local access exceptions for **Full tunnel except local networks**. Individual IPs/CIDRs can stay reachable inside otherwise blocked LAN/Site-to-site networks.
- Added managed ACCEPT exception rules ahead of broader managed REJECT policies while preserving automatic cleanup and runtime reconciliation.
- Route presets now expose current Site-to-site topology: Full tunnel except local networks shows the protected LAN/Site-to-site networks, VPN + local LAN includes them, and Custom routes starts empty when selected.
- Added WGTools application icon in the browser tab and header/login header based on the new project mark.
## v0.15.1
- Moved the full backup create/select/restore controls to the bottom of the backup block for better visual alignment.
## v0.15.0
- Redesigned full backup/restore controls into a compact Create / Select / filename / Restore row.
- Raw wg0.conf editor now closes after a successful apply and shows a clear bottom-right result notification.
- Added client duplication with automatic unique name/VPN address suggestions and duplicate validation.
- Added delayed contextual tooltips for buttons and controls.
- Telegram Bot can now resend existing managed client configs and QR codes; WireGuard service controls use compact icon buttons.
- Dashboard CPU, memory and network cards now keep and display rolling 24-hour history graphs.
- Simplified multi-destination firewall guidance to comma-separated values.
All notable public changes to WGTools are documented here.
## v0.14.0
- Added an opt-in update checker under **Settings → About** using official published GitHub Releases.
- Added one-click WGTools updates with release metadata/changelog display.
- Updates run in a separate transient systemd job so the web service can safely replace and restart itself.
- Added pre-update full `.wgtbackup` state backup plus a separate application rollback archive.
- Added automatic application rollback when update installation fails.
- Added a neutral Project / GitHub link in About.
- Expanded uninstall documentation and uninstaller output to make it explicit that WireGuard is preserved, with optional full WireGuard cleanup commands.
- Added sanitized public interface screenshots to the README.
## v0.13.2
- Reconciles the live `iptables` FORWARD chain against active WGTools-managed client policy after managed configuration transactions.
- Removes stale tagged `wgtools-protect-*` rules no longer present in `wg0.conf`.
- Collapses duplicate tagged policy rules and removes all exact copies when a restriction is deleted.
- Raw `wg0.conf` apply/restart performs the same reconciliation after WireGuard returns.
- Prevents a reused VPN address from inheriting a stale WGTools-generated REJECT rule from a deleted client.
## v0.13.1
- Fixed live synchronization for **Full Tunnel except local networks** policies.
- Deleting one generated client-policy rule creates a per-client exception for that destination while remaining restrictions continue to synchronize.
- Deleting a client removes its WGTools-generated policy rules in the same operation.
- User-created unrelated firewall rules are preserved.
## v0.13.0
- Added multiple firewall destinations separated by commas/new lines.
- Added **Full Tunnel except local networks** client mode.
- Server LAN and Site-to-site remote networks are automatically protected for that mode.
- Site-to-site add/change/delete operations update generated client restrictions.
## v0.12.1
- Removed personal developer/contact details from the About card.
- Removed redundant Read-only badges from Server summary cards.
## v0.12.0
- Added portable `.wgtbackup` migration backup and restore.
- Added archive/database validation, pre-restore safety backup and rollback.
- Restore can install WireGuard when the backup contains a server configuration and the target has no WireGuard tools.
- Successful restore clears the current web session.
## v0.11.2
- Fixed parser failure on mixed IPv4/IPv6 AllowedIPs such as `0.0.0.0/0, ::/0`.
- Parser errors no longer take down the whole dashboard/provisioning UI.
## v0.11.x
- Added built-in English/Russian help with fictional topology examples.
- Added project About information and later removed personal contact details before public release preparation.
## v0.10.0
- Added optional Telegram Bot using the official Bot API and long polling.
- Added authorized Telegram user IDs and private-chat-only administration.
- Added server status, client list/create/delete and WireGuard Start/Restart/Stop actions.
- Telegram-created clients can receive generated `.conf` and QR data.
## v0.9.0
- Added CPU, memory, server uptime and live uplink traffic metrics.
- Added compact Start/Restart/Stop controls.
- Added configurable refresh interval, online threshold and automatic backup retention.
## v0.8.0
- Added managed custom routes and firewall/NAT access rules.
- Added ownership distinction between server settings, Site-to-site routes and user rules.
## v0.7.0
- Added visual Server settings editor for VPN pool/address, port, uplink, LAN, forwarding, NAT and policy routing.
- Existing peers and unsupported custom rules are preserved.
- Added backup/apply/rollback protection for server changes.
## v0.6.0
- Added first-run account creation and login/logout.
- Added multiple local WGTools users with equal administrative permissions.
- Passwords stored as salted PBKDF2-SHA256 hashes.
## v0.5.1
- Fixed raw `wg0.conf` helper routing.
- Dashboard peer subtitle shows live Endpoint rather than repeating VPN address.
## v0.5.0
- Improved client editor layout and Site-to-site field visibility.
- New clients default to Full Tunnel.
- Server address/domain and WireGuard port became separate client-generation fields.
## Earlier development
Earlier internal versions established the dashboard, server parser, client list/create/delete workflow and initial deployment scripts.
-43
View File
@@ -1,43 +0,0 @@
# Contributing to WGTools
Thanks for helping improve WGTools.
## Before opening an issue
- Check whether the problem occurs on the latest release.
- Run the built-in Server diagnostics.
- Remove private keys, Telegram tokens, public endpoints and sensitive topology details from logs/screenshots.
- Never upload a `.wgtbackup` archive to a public issue.
Useful diagnostic commands include:
```bash
systemctl status wgtools --no-pager -l
systemctl status wgtools-telegram --no-pager -l
journalctl -u wgtools -n 100 --no-pager
journalctl -u wgtools-telegram -n 100 --no-pager
wg show
ip rule show
ip route show table all
iptables -S
iptables -t nat -S
```
Sanitize outputs before posting them publicly.
## Pull requests
Please keep changes focused and readable.
For changes that touch routing, firewall, WireGuard configuration or backup/restore logic, describe:
1. the previous behavior;
2. the new behavior;
3. how rollback/failure is handled;
4. how the change was tested.
Do not commit generated databases, private keys, `.conf` files, `.wgtbackup` archives, `.venv`, `__pycache__` or production logs.
## Language
Source code, identifiers and primary documentation should remain English. User-facing UI text can be added to both English and Russian locale files.
+1 -1
View File
@@ -1 +1 @@
Adds source IP restrictions, editing for port forwarding, and a client selector.
Pozostawiono polski język panelu i bota Telegram oraz uporządkowano dokumentację.
+1 -1
View File
@@ -1 +1 @@
1.0.4
1.0.7
+4 -835
View File
@@ -1,841 +1,10 @@
from __future__ import annotations
import json
from pathlib import Path
HELP = {'ru': [{'id': 'dashboard',
'title': 'Главная',
'intro': 'Главная — это быстрый ответ на три вопроса: работает ли WireGuard, кто сейчас подключён и всё ли нормально с самим сервером.',
'topics': [{'title': 'С чего начать',
'paragraphs': ['В верхней панели выбран текущий интерфейс WireGuard. Если интерфейсов несколько, все страницы WGTools работают '
'именно с выбранным интерфейсом.'],
'bullets': ['«Пуск» запускает WireGuard, «Стоп» останавливает его, «Перезапуск» быстро перезапускает интерфейс.',
'После перезапуска телефоны и компьютеры обычно подключаются снова автоматически.',
'Если WireGuard остановлен, клиенты этого интерфейса не смогут подключиться.'],
'example_title': 'Пример',
'example_lines': ['wg0 · Home · 10.0.0.1/24 · UDP 51820'],
'warning': ''},
{'title': 'CPU, память, сеть и время работы',
'paragraphs': ['Эти показатели относятся ко всей машине Debian, на которой установлен WGTools.'],
'bullets': ['CPU показывает текущую загрузку процессора.',
'Память показывает занятую и доступную RAM.',
'Сеть показывает текущую скорость приёма и передачи на внешнем интерфейсе.',
'Uptime показывает, сколько сервер работает после последней перезагрузки.',
'Суточные графики помогают заметить необычную нагрузку или постоянный сетевой трафик.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Кто подключён',
'paragraphs': ['WireGuard не держит постоянную «сессию» как обычный веб-сайт. WGTools считает клиента онлайн, если его '
'последний handshake был недавно.'],
'bullets': ['Handshake — последний успешный обмен служебными пакетами WireGuard.',
'Endpoint — внешний IP и порт, с которого клиент сейчас выходит в Интернет.',
'«Никогда» означает, что сервер ещё не видел успешного подключения этого клиента.',
'Быстрый поиск фильтрует список по имени, VPN-адресу, типу и Endpoint.'],
'example_title': 'Пример',
'example_lines': ['Телефон · 10.0.0.3/32', 'Endpoint: 203.0.113.25:63275', 'Handshake: 18 сек назад'],
'warning': ''},
{'title': 'Трафик',
'paragraphs': ['WGTools хранит накопленные RX/TX отдельно от мгновенных счётчиков WireGuard, поэтому статистика не пропадает '
'после перезапуска интерфейса или сервера.'],
'bullets': ['Карточка «Трафик» показывает общий объём данных выбранного интерфейса.',
'У каждого клиента также хранится его накопленный RX/TX.',
'«Сбросить» начинает общий и клиентские счётчики заново с текущего момента.',
'RX/TX в карточке «Сеть» — это скорость прямо сейчас, а не накопленный объём.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Несколько WireGuard-интерфейсов',
'paragraphs': ['На одном сервере можно держать несколько независимых VPN, например домашний и рабочий.'],
'bullets': ['Переключение в верхней панели не изменяет конфигурацию — оно только выбирает, с каким интерфейсом сейчас работают '
'Главная, Сервер и Клиенты.',
'У каждого интерфейса свои адреса, порт, клиенты, маршруты и правила доступа.'],
'example_title': 'Пример',
'example_lines': ['wg0 · Home · 10.0.0.1/24', 'wg1 · Work · 10.0.1.1/24'],
'warning': ''}]},
{'id': 'server',
'title': 'Сервер',
'intro': 'Раздел «Сервер» отвечает за сам WireGuard: интерфейсы, маршруты, доступ к сетям, объединение нескольких WGTools через Nodes и '
'работу через публичный VPS Relay.',
'topics': [{'title': 'Что такое VPN-сеть и интерфейс WireGuard',
'paragraphs': ['Интерфейс WireGuard можно представить как отдельную виртуальную сетевую карту. У неё есть своя маленькая '
'VPN-сеть, а каждому клиенту выдаётся адрес из этой сети.'],
'bullets': ['Системное имя обычно выглядит как wg0, wg1 и т. д.',
'Понятное имя, например Home или Office, нужно только для удобства.',
'ListenPort — UDP-порт, на который подключаются клиенты.',
'MTU обычно можно оставить «Авто»; вручную его меняют только при проблемах с конкретной сетью, LTE или PPPoE.'],
'example_title': 'Пример',
'example_lines': ['VPN-сеть: 10.0.0.0/24', 'Адрес сервера: 10.0.0.1/24', 'Клиенты: 10.0.0.2, 10.0.0.3, ...', 'Порт: UDP 51820'],
'warning': ''},
{'title': 'Первый запуск и новые интерфейсы',
'paragraphs': ['На чистой Debian WGTools может установить WireGuard и создать первый интерфейс через мастер. После этого можно '
'добавить wg1, wg2 и другие.'],
'bullets': ['WGTools предлагает свободную VPN-сеть, UDP-порт и таблицу policy routing.',
'Перед созданием проверяются пересечения сетей и занятые порты.',
'Для каждого интерфейса создаются собственные ключи и конфигурация.',
'Удаление интерфейса сначала делает резервную копию и очищает связанные управляемые данные.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'NAT простыми словами',
'paragraphs': ['NAT/MASQUERADE нужен, когда VPN-клиент должен выходить в локальную сеть или Интернет от имени самого '
'WireGuard-сервера. Для домашней установки это обычно самый простой вариант.'],
'bullets': ['Если NAT включён, домашнему роутеру обычно не нужен отдельный маршрут обратно к VPN-пулу.',
'Если NAT выключен и вы хотите настоящую маршрутизацию без подмены адресов, на соседних роутерах должны быть '
'обратные маршруты.'],
'example_title': 'Пример',
'example_lines': ['Телефон 10.0.0.3 → WGTools 192.168.1.10 → Интернет', 'Домашний роутер видит источник 192.168.1.10'],
'warning': ''},
{'title': 'Маршруты и policy routing',
'paragraphs': ['Маршрут говорит Linux, через какой интерфейс или шлюз искать определённую сеть. Policy routing добавляет '
'отдельную таблицу правил для трафика VPN-клиентов.'],
'bullets': ['Обычной домашней установке отдельная policy table часто не нужна.',
'Она полезна, если VPN-клиенты должны выходить через конкретный шлюз, другой VPN или отдельный WAN.',
'WGTools показывает системные маршруты, маршруты Site-to-Site и созданные вручную маршруты отдельно.',
'Пользовательские маршруты можно добавлять, изменять и удалять из интерфейса.'],
'example_title': 'Пример',
'example_lines': ['Источник: 10.0.0.0/24', 'Таблица: 200', 'Default via: 192.168.1.1 dev eth0'],
'warning': ''},
{'title': 'Firewall и доступ к сетям',
'paragraphs': ['Firewall определяет не куда отправлять пакет, а разрешён ли ему доступ. Это отдельная вещь от маршрутов.'],
'bullets': ['Можно разрешать или запрещать доступ конкретному VPN-клиенту или сети.',
'Правила групп и индивидуальные исключения клиентов собираются WGTools автоматически.',
'Перед изменениями WGTools делает backup и откатывает конфигурацию, если WireGuard не смог запуститься.'],
'example_title': 'Пример',
'example_lines': ['10.0.0.6/32 → запретить → 192.168.1.0/24', 'Остальным клиентам локальная сеть доступна'],
'warning': ''},
{'title': 'Site-to-Site: соединяем две обычные сети',
'paragraphs': ['Site-to-Site нужен, когда через WireGuard подключается не один телефон, а целая удалённая сеть за роутером или '
'сервером.'],
'bullets': ['У такого peer указываются «Удалённые сети». WGTools автоматически создаёт для них маршруты.',
'Статус online/offline peer не удаляет его маршруты из конфигурации.',
'На удалённой стороне также должна быть настроена маршрутизация обратно через WireGuard.'],
'example_title': 'Пример',
'example_lines': ['Дом: 192.168.1.0/24',
'Офисный peer: 10.0.0.20/32',
'Сеть за офисом: 192.168.50.0/24',
'Результат: устройства дома могут обращаться к 192.168.50.x'],
'warning': ''},
{'title': 'WGTools Nodes: связываем несколько WGTools',
'paragraphs': ['Nodes соединяет несколько установок WGTools отдельным служебным WireGuard-туннелем. Один сервер становится HUB, '
'остальные подключаются к нему по одноразовому коду.'],
'bullets': ['HUB использует один номер порта: UDP для WireGuard и TCP для первоначального защищённого подключения.',
'После подключения служебная синхронизация идёт внутри интерфейса wgnode0 и не зависит от адреса веб-панели, '
'HTTPS-порта или private path.',
'При подключении WGTools предлагает найденные VPN-, Site-to-Site и локальные сети. Оставьте только те, которые '
'действительно хотите опубликовать.',
'Новая найденная сеть позже не публикуется сама — её нужно явно добавить в «Настройках узла». Если VPN-пул, Site-to-Site или LAN изменились после сохранения, WGTools покажет предупреждение и предложит проверить список.',
'Опубликованные сети разных узлов не должны пересекаться. Если, например, Home и VPS оба публикуют 10.0.0.0/24, WGTools не даст сохранить такое подключение и покажет конфликт.',
'В «Подробнее» можно посмотреть сети и клиентов удалённой панели в режиме только чтения.',
'Публикация сети делает её доступной связанным узлам, поэтому не публикуйте сети, которым не нужен межсайтовый '
'доступ.'],
'example_title': 'Пример: дом + VPS',
'example_lines': ['HUB: vpn.example.com:51950',
'Home публикует: 192.168.1.0/24',
'VPS публикует: 10.20.0.0/24',
'После pairing обе стороны получают маршруты через wgnode0'],
'warning': ''},
{'title': 'VPS Relay: когда у дома нет белого IP',
'paragraphs': ['VPS Relay нужен, если клиенты не могут напрямую достучаться до WGTools из Интернета, например из-за CGNAT. '
'Публичный VPS становится точкой входа, а сам WireGuard-сервер и правила доступа остаются на вашей машине '
'WGTools.'],
'bullets': ['Добавьте VPS по SSH: WGTools сначала проверит ОС, доступ и порты, затем установит Relay Agent.',
'Один Relay Agent может обслуживать несколько независимых WGTools — подключения и ключи изолированы.',
'После установки у поддерживаемых клиентов можно выбрать прямое подключение или подключение через Relay.',
'Удаление VPS из WGTools отключает локальную связь, но оставляет Relay Agent и сохранённый tenant на VPS, поэтому '
'его можно подключить повторно.',
'VPS Relay и Nodes решают разные задачи: Relay даёт публичную точку входа клиентам, Nodes связывает между собой '
'несколько WGTools и их сети.'],
'example_title': 'Пример',
'example_lines': ['Телефон → публичный VPS → защищённый Relay-транспорт → WGTools дома → нужная сеть'],
'warning': ''},
{'title': 'Диагностика',
'paragraphs': ['Диагностика проверяет состояние WireGuard, IP forwarding, порты, маршруты и связанные системные службы. Она '
'полезна, когда клиент не подключается или сеть за VPN недоступна.'],
'bullets': ['Сначала смотрите, запущен ли интерфейс и есть ли свежий handshake.',
'Если handshake есть, но адрес не пингуется, обычно проблема уже в маршруте, firewall или обратном пути.',
'Во вкладке Сервер → Маршрут traceroute показывает каждый отвечающий узел, средний RTT и скачок задержки относительно предыдущего отвечающего hop. Цвет линии и строки помогает сразу увидеть участок, где задержка выросла; неотвечающие служебным пробам узлы показываются нейтрально.',
'Интерактивную карту можно масштабировать и перетаскивать; нажатие на узел показывает IP, расположение, ASN/провайдера и RTT.',
'При включённой карте публичные IP узлов геолокируются через ipwho.is, тайлы загружаются с OpenStreetMap; локальные адреса на геолокацию не отправляются.',
'Traceroute измеряет задержку, а не реальную пропускную способность канала в Мбит/с.',
'Диагностика не изменяет конфигурацию сама.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Безопасное применение изменений',
'paragraphs': ['Настройки сервера, маршрутов и firewall применяются с коротким перезапуском WireGuard.'],
'bullets': ['Перед изменением создаётся резервная копия конфигурации.',
'Если новая конфигурация не запускается, WGTools старается вернуть предыдущую автоматически.',
'Активные клиенты во время перезапуска кратковременно отключатся и затем переподключатся.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Вкладка «Конфиг»',
'paragraphs': ['Это прямой редактор файла /etc/wireguard/<интерфейс>.conf для случаев, которые нельзя выразить обычными формами '
'WGTools.'],
'bullets': ['Используйте его только если понимаете синтаксис WireGuard и команды PostUp/PostDown.',
'Перед сохранением WGTools проверяет конфигурацию и создаёт backup.',
'Если WGTools обнаружит нестандартную конфигурацию, часть автоматического редактирования может быть ограничена, '
'чтобы не повредить ваши ручные правила.'],
'example_title': 'Пример',
'example_lines': ['[Interface]', 'Address = 10.0.0.1/24', 'ListenPort = 51820', '', '[Peer]', 'AllowedIPs = 10.0.0.2/32'],
'warning': 'PrivateKey, PresharedKey и другие секреты не публикуйте и не отправляйте посторонним.'}]},
{'id': 'clients',
'title': 'Клиенты',
'intro': 'Клиент — это телефон, ноутбук, роутер или другой WireGuard-peer. Здесь создаются конфиги, права доступа, сроки, расписания и '
'Site-to-Site подключения.',
'topics': [{'title': 'Обычный клиент',
'paragraphs': ['Для телефона или компьютера выбирайте тип «Клиент». WGTools выдаст свободный VPN-адрес и создаст ключи.'],
'bullets': ['Имя нужно только для удобства в панели.',
'Endpoint в готовом конфиге — адрес, по которому устройство находит ваш WireGuard-сервер.',
'DNS можно задать отдельно для клиента или получить из шаблона группы.'],
'example_title': 'Пример',
'example_lines': ['Имя: Phone', 'VPN-адрес: 10.0.0.3/32', 'Endpoint: vpn.example.com:51820'],
'warning': ''},
{'title': '«Трафик через VPN» и AllowedIPs',
'paragraphs': ['AllowedIPs в клиентском конфиге определяет, какой трафик устройство отправит в туннель. Это не то же самое, что '
'серверные права доступа.'],
'bullets': ['«Весь трафик» отправляет через VPN и Интернет, и удалённые сети.',
'Можно отправлять через VPN только нужные сети.',
'Пресет с исключением локальных сетей удобен, когда клиенту нужен VPN-Интернет, но домашний принтер или роутер '
'должны оставаться доступными напрямую.',
'Серверная политика WGTools всё равно может запретить доступ к сети, даже если она есть в AllowedIPs.'],
'example_title': 'Пример',
'example_lines': ['0.0.0.0/0 — весь IPv4-трафик через VPN', '192.168.50.0/24 — только одна удалённая сеть'],
'warning': ''},
{'title': 'Группы клиентов',
'paragraphs': ['Группа позволяет один раз настроить правила и шаблон, а затем использовать их для нескольких клиентов.'],
'bullets': ['Группа может задавать доступ в Интернет, локальные сети, дополнительные разрешения и запреты.',
'Также группа хранит шаблон клиентского конфига: маршруты, DNS и Keepalive.',
'Изменение политики группы применяется на сервере сразу, а уже установленный конфиг на телефоне не меняется сам.',
'Если нужно обновить клиентский конфиг по новому шаблону группы, примените шаблон и выдайте новый файл или QR.'],
'example_title': 'Пример',
'example_lines': ['Группа «Гости»', 'Интернет: разрешён', 'Локальная сеть: запрещена', 'Клиенты: Phone-1, Tablet-1'],
'warning': ''},
{'title': 'Индивидуальные права клиента',
'paragraphs': ['Для отдельного клиента можно наследовать политику группы или задать собственные исключения.'],
'bullets': ['Разрешение или запрет конкретного адреса у клиента имеет приоритет над общим исключением группы.',
'Так удобно открыть одному сотруднику сервер, который закрыт остальным членам группы.'],
'example_title': 'Пример',
'example_lines': ['Группа запрещает 192.168.1.0/24', 'Клиенту дополнительно разрешено 192.168.1.50/32'],
'warning': ''},
{'title': 'Site-to-Site клиент',
'paragraphs': ['Выбирайте Site-to-Site, если за peer находится целая сеть. В поле удалённых сетей перечислите сети, доступные '
'через этот peer.'],
'bullets': ['WGTools добавит эти сети в серверные маршруты автоматически.',
'Такие сети затем могут быть опубликованы через Nodes.',
'Обычному телефону или ноутбуку Site-to-Site не нужен.'],
'example_title': 'Пример',
'example_lines': ['Peer роутера: 10.0.0.20/32', 'Удалённая сеть: 192.168.50.0/24'],
'warning': ''},
{'title': 'Прямое подключение и VPS Relay',
'paragraphs': ['Если для текущего интерфейса настроен VPS Relay, клиент можно направить к серверу напрямую или через Relay.'],
'bullets': ['«Напрямую» подходит, когда WireGuard-порт сервера доступен из Интернета.',
'Relay полезен за CGNAT или когда прямой входящий UDP недоступен.',
'Права клиента и его VPN-адрес при этом остаются теми же.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'PSK, изоляция и смена ключей',
'paragraphs': ['WireGuard уже использует ключи шифрования. Дополнительный PSK добавляет ещё один общий секрет между сервером и '
'клиентом.'],
'bullets': ['Изоляция клиента запрещает ему общаться с другими VPN-адресами того же WireGuard-пула.',
'«Сменить ключи» создаёт новую ключевую пару и новый PSK, если он включён.',
'После смены ключей старый конфиг перестаёт работать — нужно выдать новый файл или QR.',
'VPN-адрес, группа, расписание и статистика при смене ключей сохраняются.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Временный доступ',
'paragraphs': ['Клиенту можно задать срок: 1, 3, 6 часов, 1 день или своё время.'],
'bullets': ['После окончания срока WGTools либо отключит доступ, сохранив клиента, либо выполнит выбранное действие.',
'Проверка сроков выполняется автоматически отдельной службой.',
'Чтобы вернуть сохранённому отключённому клиенту доступ, задайте новый срок или «Без ограничения».'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Расписание доступа',
'paragraphs': ['Расписание автоматически разрешает и блокирует клиента в выбранные дни и часы без замены его конфига.'],
'bullets': ['Используется локальное время WireGuard-сервера.',
'Можно задавать интервалы через полночь, например 22:00–06:00.',
'Когда разрешённый интервал начинается снова, WGTools возвращает тот же peer.'],
'example_title': 'Пример',
'example_lines': ['Пн–Пт: 08:00–19:00'],
'warning': ''},
{'title': 'Статус, Endpoint и трафик',
'paragraphs': ['В таблице видны последний handshake, Endpoint и накопленный RX/TX.'],
'bullets': ['Свежий handshake означает, что клиент недавно связывался с сервером.',
'Endpoint может меняться у мобильного телефона при переходе между Wi-Fi и LTE — это нормально.',
'Быстрый поиск помогает найти клиента по имени, адресу, группе или состоянию.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Конфиг и QR',
'paragraphs': ['Файл .conf подходит для компьютеров и роутеров, QR удобен для приложения WireGuard на телефоне.'],
'bullets': ['PrivateKey клиента находится внутри конфига и QR — относитесь к ним как к паролю.',
'Повторная выдача управляемого клиента использует сохранённые WGTools ключи.',
'После смены ключей обязательно выдайте новый конфиг.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Изменение и удаление',
'paragraphs': ['WGTools делает резервную копию перед изменением WireGuard-конфига и применяет изменения через безопасный '
'sync/restart.'],
'bullets': ['При удалении управляемого клиента удаляются его peer, сохранённые ключи и связанные управляемые правила.',
'Удаление клиента не стирает конфиг, который уже сохранён на телефоне, но этот конфиг больше не сможет '
'подключиться.'],
'example_title': '',
'example_lines': [],
'warning': ''}]},
{'id': 'settings',
'title': 'Настройки',
'intro': 'Здесь находятся внешний вид WGTools, резервные копии, Telegram, почта, HTTPS, пользователи, аудит и обновления.',
'topics': [{'title': 'Оформление и язык',
'paragraphs': ['Можно выбрать светлую, тёмную или системную тему и язык интерфейса.'],
'bullets': ['«Свернуть панель» оставляет в боковом меню только значки.',
'Состояние боковой панели хранится в текущем браузере и применяется сразу.',
'Язык интерфейса сохраняется в WGTools.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Частота обновления статуса',
'paragraphs': ['Интервал определяет, как часто страницы обновляют состояние клиентов и сервера. Порог Online определяет, '
'сколько времени после handshake клиент считается подключённым.'],
'bullets': [],
'example_title': 'Пример',
'example_lines': ['Обновление: 5 сек', 'Online: 180 сек'],
'warning': ''},
{'title': 'Автоматические резервные копии',
'paragraphs': ['Перед опасными изменениями WGTools сохраняет историю WireGuard-конфигураций. Это быстрый способ откатить '
'неудачное изменение одного интерфейса.'],
'bullets': ['Можно настроить количество хранимых копий.', 'Эта история не заменяет полный переносимый backup всего WGTools.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Полный backup и восстановление',
'paragraphs': ['Файл .wgtbackup предназначен для переезда на новый сервер или аварийного восстановления.'],
'bullets': ['В него входят конфигурации WireGuard, база пользователей и настроек, группы, данные управляемых клиентов, '
'Telegram/SMTP и состояние VPS Relay/Nodes, необходимое для восстановления.',
'Перед restore WGTools проверяет архив и создаёт страховочную копию текущего состояния.',
'Если применение восстановленных данных не удалось, выполняется автоматический откат.',
'После успешного восстановления текущая веб-сессия завершается — войдите пользователем из восстановленной базы.'],
'example_title': '',
'example_lines': [],
'warning': 'В .wgtbackup находятся приватные ключи, PSK, хэши паролей, Telegram-токен и SMTP-пароль. Храните файл как пароль.'},
{'title': 'Telegram Bot',
'paragraphs': ['Telegram позволяет проверить сервер и управлять WireGuard без открытия веб-панели.'],
'bullets': ['Создайте бота через @BotFather и вставьте Bot Token.',
'Включите бота и отправьте ему /start.',
'Если ваш Telegram user ID ещё не разрешён, бот покажет числовой ID. Добавьте его в список разрешённых ID.',
'Бот принимает команды управления только в личном чате.',
'Через бот доступны состояние сервера, клиенты, создание/удаление, выдача конфига/QR и управление WireGuard.'],
'example_title': 'Пример',
'example_lines': ['Endpoint по умолчанию: vpn.example.com', 'DNS: 1.1.1.1, 8.8.8.8'],
'warning': ''},
{'title': 'Почта / SMTP и восстановление пароля',
'paragraphs': ['SMTP нужен для функции «Забыли пароль?» на странице входа.'],
'bullets': ['Поддерживаются STARTTLS, TLS/SSL и SMTP без шифрования для доверенной локальной сети.',
'Логин может быть пустым, если ваш SMTP-сервер не требует авторизации.',
'Пароль сохраняется локально и обратно в браузер не возвращается.',
'Кнопка теста отправляет письмо на указанный тестовый адрес.',
'Код восстановления одноразовый, хранится в виде хэша, действует 15 минут и имеет ограничение числа попыток.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Встроенный HTTPS',
'paragraphs': ['WGTools может сам обслуживать HTTPS без Nginx, Caddy или другого reverse proxy.'],
'bullets': ['Сначала заполните домен/публичный IP, e-mail, HTTPS-порт и private path, затем нажмите «Получить / обновить сертификат». Эта кнопка одновременно сохраняет введённые настройки.',
'Пока подходящего сертификата нет, флажок «Включить встроенный HTTPS» недоступен. После успешного выпуска сертификата включите его и нажмите «Сохранить».',
'Если изменить домен или публичный IP, WGTools попросит получить сертификат для нового адреса перед включением HTTPS.',
'Для выпуска и автопродления Let’s Encrypt TCP 80 должен быть доступен из Интернета до этого сервера.',
'Панель работает на выбранном HTTPS-порту, например 443 или 8443.',
'Private path задаёт адрес панели, например /MyWGTools/. При включённом HTTPS запросы к другим путям получают 404.',
'WGTools показывает локальную занятость портов и не останавливает чужой веб-сервер.',
'Сертификат автоматически продлевается отдельным systemd timer.'],
'example_title': 'Пример',
'example_lines': ['https://wg.example.com/MyWGTools/'],
'warning': 'Private path не заменяет пароль. Не публикуйте адрес панели без необходимости и используйте сильные учётные '
'данные.'},
{'title': 'Пользователи',
'paragraphs': ['Первый пользователь создаётся при первом запуске WGTools. Дополнительных пользователей можно добавить в '
'Настройках.'],
'bullets': ['Сейчас пользователи имеют одинаковые права управления.',
'Можно менять E-mail и пароль, а также удалять пользователей.',
'Для своей учётной записи можно включить MFA через Google Authenticator или другое TOTP-приложение. При включении WGTools показывает одноразовый набор резервных кодов.',
'Если устройство с Authenticator потеряно, root может аварийно отключить MFA для выбранного пользователя через CLI wgtools.',
'Текущего пользователя и последнего оставшегося пользователя удалить нельзя.',
'Смена или восстановление пароля, включение или отключение MFA завершает старые веб-сессии этого пользователя.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Аудит',
'paragraphs': ['Аудит показывает важные действия в панели, Telegram и историю значимых подключений WireGuard.'],
'bullets': ['Для веб-действий сохраняется имя пользователя WGTools.',
'Для Telegram сохраняются @username, если доступен, и числовой Telegram ID.',
'Отмечаются изменения конфигурации, выдача клиентского конфига/QR, обновления и полезные ошибки.',
'Пароли, приватные ключи, PSK, токены и содержимое конфигов в аудит не записываются.',
'Журнал хранится ограниченное время и очищается автоматически.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Обновления WGTools',
'paragraphs': ['WGTools периодически проверяет стабильные GitHub Releases, но никогда не устанавливает обновление без вашего '
'подтверждения.'],
'bullets': ['При наличии новой версии появляется уведомление в боковой панели.',
'Перед обновлением создаётся полный .wgtbackup и отдельный архив приложения для rollback.',
'Если новая версия не запустилась, WGTools пытается автоматически вернуть предыдущую.',
'Версию можно увидеть в шапке/боковой панели и в разделе «О программе».'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Команда wgtools и аварийный доступ',
'paragraphs': ['После установки доступна команда wgtools от root. Она полезна, если веб-панель недоступна.'],
'bullets': ['Команда показывает состояние WGTools, WireGuard, Nodes, Telegram, таймеров, локального Relay Agent и текущий URL панели.',
'Из неё можно запустить, остановить или перезапустить панель и WireGuard, посмотреть логи.',
'Если ошиблись с HTTPS-портом или private path, CLI позволяет отключить встроенный HTTPS и вернуть HTTP-доступ.',
'В разделе Security можно аварийно отключить MFA для выбранного пользователя, если потерян доступ к Google Authenticator и резервным кодам.',
'Пункт «Uninstall WGTools» удаляет панель и её службы, но сохраняет обычный WireGuard и данные для возможной переустановки.',
'Пункт «FULL CLEANUP» полностью очищает этот сервер от WGTools, локального Relay и WireGuard; перед выполнением требуется ввести DELETE ALL. Удалённые Relay на других VPS не затрагиваются.'],
'example_title': 'Пример',
'example_lines': ['root@server:~# wgtools'],
'warning': ''},
{'title': 'Где хранятся данные',
'paragraphs': ['Обычно вручную редактировать эти файлы не требуется, но пути полезны для диагностики и резервного копирования.'],
'bullets': [],
'example_title': 'Основные пути',
'example_lines': ['/etc/wireguard/wg0.conf — конфигурация WireGuard',
'/var/lib/wgtools/wgtools.db — пользователи и настройки',
'/var/lib/wgtools/clients/ — данные управляемых клиентов',
'/var/lib/wgtools/backups/ — история конфигураций',
'/var/lib/wgtools/update-backups/ — rollback-копии обновлений'],
'warning': ''}]}],
'en': [{'id': 'dashboard',
'title': 'Dashboard',
'intro': 'Dashboard answers three quick questions: is WireGuard running, who is connected, and is the server itself healthy?',
'topics': [{'title': 'Where to start',
'paragraphs': ['The top bar shows the currently selected WireGuard interface. If several interfaces exist, the main WGTools '
'pages work with the selected one.'],
'bullets': ['Start brings WireGuard up, Stop takes it down, and Restart briefly restarts the interface.',
'Phones and computers normally reconnect automatically after a restart.',
'When the interface is stopped, its clients cannot connect.'],
'example_title': 'Example',
'example_lines': ['wg0 · Home · 10.0.0.1/24 · UDP 51820'],
'warning': ''},
{'title': 'CPU, memory, network and uptime',
'paragraphs': ['These values describe the whole Debian host, not just WireGuard.'],
'bullets': ['CPU shows current processor load.',
'Memory shows used and total RAM.',
'Network shows current receive/transmit rate on the external interface.',
'Uptime is the time since the operating system last booted.',
'Rolling daily charts help spot unusual load or sustained network activity.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Who is connected',
'paragraphs': ['WireGuard does not keep a traditional web-style session. WGTools considers a client online when its latest '
'handshake is recent enough.'],
'bullets': ['Handshake is the latest successful WireGuard control exchange.',
'Endpoint is the public IP and port the client currently uses.',
'Never means the server has not yet seen a successful handshake from that peer.',
'Quick search filters by name, VPN address, type and Endpoint.'],
'example_title': 'Example',
'example_lines': ['Phone · 10.0.0.3/32', 'Endpoint: 203.0.113.25:63275', 'Handshake: 18 s ago'],
'warning': ''},
{'title': 'Traffic',
'paragraphs': ['WGTools keeps persistent RX/TX totals separately from the temporary counters exposed by WireGuard, so '
'statistics survive interface and server restarts.'],
'bullets': ['The Traffic card shows accumulated data for the selected interface.',
'Each client also has its own accumulated RX/TX.',
'Reset starts the interface and client totals again from the current moment.',
'RX/TX on the Network card is the current speed, not the accumulated total.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Multiple WireGuard interfaces',
'paragraphs': ['One server can host several independent VPNs, for example Home and Work.'],
'bullets': ['Switching the top selector does not change configuration; it only chooses what Dashboard, Server and Clients '
'currently display.',
'Every interface has its own addresses, port, clients, routes and access rules.'],
'example_title': 'Example',
'example_lines': ['wg0 · Home · 10.0.0.1/24', 'wg1 · Work · 10.0.1.1/24'],
'warning': ''}]},
{'id': 'server',
'title': 'Server',
'intro': 'Server controls WireGuard itself: interfaces, routing, network access, linking multiple WGTools installations with Nodes, and '
'public access through VPS Relay.',
'topics': [{'title': 'VPN networks and WireGuard interfaces',
'paragraphs': ['Think of a WireGuard interface as a virtual network card with its own small VPN subnet. Each client receives an '
'address from that subnet.'],
'bullets': ['System names are usually wg0, wg1 and so on.',
'A display name such as Home or Office is only for convenience.',
'ListenPort is the UDP port clients connect to.',
'MTU can normally stay on Auto; set it manually only when a particular network, LTE connection or PPPoE requires '
'it.'],
'example_title': 'Example',
'example_lines': ['VPN network: 10.0.0.0/24',
'Server address: 10.0.0.1/24',
'Clients: 10.0.0.2, 10.0.0.3, ...',
'Port: UDP 51820'],
'warning': ''},
{'title': 'First setup and additional interfaces',
'paragraphs': ['On a clean Debian host, WGTools can install WireGuard and create the first interface with a guided form. You '
'can later add wg1, wg2 and more.'],
'bullets': ['WGTools suggests a free VPN subnet, UDP port and policy-routing table.',
'Overlapping networks and occupied ports are checked before creation.',
'Every interface receives its own keys and configuration.',
'Deleting an interface creates a backup first and removes its managed data.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'NAT in plain language',
'paragraphs': ['NAT/MASQUERADE is useful when a VPN client should reach the LAN or Internet using the WireGuard server as its '
'visible source. For a typical home setup this is often the simplest option.'],
'bullets': ['With NAT enabled, the home router normally does not need a separate return route to the VPN subnet.',
'With NAT disabled, true routed networking requires return routes on the neighboring routers.'],
'example_title': 'Example',
'example_lines': ['Phone 10.0.0.3 → WGTools 192.168.1.10 → Internet', 'Home router sees source 192.168.1.10'],
'warning': ''},
{'title': 'Routes and policy routing',
'paragraphs': ['A route tells Linux which interface or gateway leads to a network. Policy routing adds a separate routing table '
'for selected traffic, such as traffic from VPN clients.'],
'bullets': ['A simple home installation often does not need a separate policy table.',
'It is useful when VPN clients must use a specific gateway, another VPN or a dedicated WAN.',
'WGTools distinguishes system routes, Site-to-Site routes and manually created routes.',
'Custom routes can be added, edited and deleted in the UI.'],
'example_title': 'Example',
'example_lines': ['Source: 10.0.0.0/24', 'Table: 200', 'Default via: 192.168.1.1 dev eth0'],
'warning': ''},
{'title': 'Firewall and network access',
'paragraphs': ['Firewall rules decide whether traffic is allowed. Routing only decides where traffic goes; these are separate '
'concerns.'],
'bullets': ['You can allow or block a particular VPN client or network.',
'Group policy and per-client exceptions are generated by WGTools automatically.',
'Before applying changes, WGTools backs up the configuration and rolls back if WireGuard cannot start.'],
'example_title': 'Example',
'example_lines': ['10.0.0.6/32 → block → 192.168.1.0/24', 'Other clients can still reach the LAN'],
'warning': ''},
{'title': 'Site-to-Site: connect two normal networks',
'paragraphs': ['Site-to-Site is for a peer that represents an entire remote network instead of a single phone or laptop.'],
'bullets': ['Enter the networks behind that peer as Remote Networks and WGTools creates the routes automatically.',
'A peer going offline does not remove those configured routes.',
'The remote side also needs a return route through WireGuard.'],
'example_title': 'Example',
'example_lines': ['Home: 192.168.1.0/24',
'Office peer: 10.0.0.20/32',
'Office LAN: 192.168.50.0/24',
'Result: home devices can reach 192.168.50.x'],
'warning': ''},
{'title': 'WGTools Nodes: link several WGTools servers',
'paragraphs': ['Nodes connects several WGTools installations through a dedicated internal WireGuard tunnel. One installation '
'becomes the HUB and the others join it with a one-time code.'],
'bullets': ['The HUB uses one port number: UDP for WireGuard and TCP for the initial protected pairing.',
'After pairing, service synchronization stays inside wgnode0 and does not depend on the web-panel URL, HTTPS port '
'or private path.',
'WGTools pre-fills detected VPN, Site-to-Site and local networks. Keep only the networks you actually want to '
'publish.',
'A network discovered later is not published silently; add it explicitly in Node settings. If a VPN pool, Site-to-Site network or LAN changes after saving, WGTools shows a warning to review the list.',
'Published networks on different Nodes must not overlap. For example, if Home and VPS both publish 10.0.0.0/24, WGTools blocks the change and identifies the conflict.',
'Details shows remote networks and clients in read-only mode.',
'Publishing a network makes it reachable to connected nodes, so publish only what is required.'],
'example_title': 'Example: home + VPS',
'example_lines': ['HUB: vpn.example.com:51950',
'Home publishes: 192.168.1.0/24',
'VPS publishes: 10.20.0.0/24',
'After pairing both sides route through wgnode0'],
'warning': ''},
{'title': 'VPS Relay: when home has no public IP',
'paragraphs': ['VPS Relay helps when clients cannot reach WGTools directly from the Internet, for example behind CGNAT. A '
'public VPS becomes the entry point while the WireGuard server and access policy stay on your WGTools host.'],
'bullets': ['Add the VPS over SSH: WGTools checks the host and ports first, then installs the Relay Agent.',
'One Relay Agent can serve several independent WGTools controllers with isolated connections and keys.',
'Supported clients can then use a direct connection or VPS Relay.',
'Removing a VPS from WGTools detaches the local transport but leaves the Relay Agent and saved tenant on the VPS so '
'it can be reconnected.',
'VPS Relay and Nodes solve different problems: Relay provides a public entry point for clients; Nodes links WGTools '
'servers and their networks.'],
'example_title': 'Example',
'example_lines': ['Phone → public VPS → protected Relay transport → home WGTools → required network'],
'warning': ''},
{'title': 'Diagnostics',
'paragraphs': ['Diagnostics checks WireGuard state, IP forwarding, ports, routes and related system services. It is useful when '
'a client cannot connect or a routed network is unreachable.'],
'bullets': ['First check whether the interface is running and a fresh handshake exists.',
'If the handshake works but the destination does not, the remaining issue is usually routing, firewall or the '
'return path.',
'The Server → Trace tab shows each responding traceroute hop, average RTT and latency increase versus the previous responding hop. Route/table colors make sharp latency growth easy to spot, while hops that simply do not answer traceroute probes are shown neutrally.',
'The interactive map supports pan and zoom; clicking a hop shows its IP, approximate location, ASN/provider and RTT.',
'When the map is enabled, public hop IPs are geolocated through ipwho.is and tiles are loaded from OpenStreetMap; private addresses are not sent for geolocation.',
'Traceroute measures latency, not real link throughput in Mbit/s.',
'Diagnostics does not change configuration by itself.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Safe apply',
'paragraphs': ['Server, route and firewall changes briefly restart WireGuard when needed.'],
'bullets': ['WGTools creates a configuration backup first.',
'If the new configuration fails to start, WGTools attempts to restore the previous one automatically.',
'Connected clients briefly disconnect and normally reconnect on their own.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Config tab',
'paragraphs': ['This is a direct editor for /etc/wireguard/<interface>.conf when you need something the normal WGTools forms do '
'not expose.'],
'bullets': ['Use it only if you understand WireGuard syntax and PostUp/PostDown commands.',
'WGTools validates and backs up the file before applying it.',
'When a non-standard configuration is detected, some automatic editing can be limited to avoid damaging manual '
'rules.'],
'example_title': 'Example',
'example_lines': ['[Interface]', 'Address = 10.0.0.1/24', 'ListenPort = 51820', '', '[Peer]', 'AllowedIPs = 10.0.0.2/32'],
'warning': 'Do not publish or share PrivateKey, PresharedKey or other secrets.'}]},
{'id': 'clients',
'title': 'Clients',
'intro': 'A client can be a phone, laptop, router or any other WireGuard peer. This page creates configurations, access policies, '
'expiration rules, schedules and Site-to-Site links.',
'topics': [{'title': 'Normal client',
'paragraphs': ['Use Client for a phone or computer. WGTools allocates a free VPN address and creates the keys.'],
'bullets': ['The name is only a label inside WGTools.',
'Endpoint in the generated configuration is the address the device uses to find your WireGuard server.',
'DNS can be set per client or inherited from a group template.'],
'example_title': 'Example',
'example_lines': ['Name: Phone', 'VPN address: 10.0.0.3/32', 'Endpoint: vpn.example.com:51820'],
'warning': ''},
{'title': 'Traffic through VPN and AllowedIPs',
'paragraphs': ['AllowedIPs in the client configuration decides what the device sends into the tunnel. It is separate from '
'server-side access policy.'],
'bullets': ['All traffic sends both Internet and remote-network traffic through the VPN.',
'You can send only selected networks through the VPN.',
'The local-network exclusion preset is useful when VPN Internet is wanted but a local printer/router should remain '
'direct.',
'Server policy can still block a destination even when it appears in AllowedIPs.'],
'example_title': 'Example',
'example_lines': ['0.0.0.0/0 — all IPv4 traffic through VPN', '192.168.50.0/24 — only one remote network'],
'warning': ''},
{'title': 'Client groups',
'paragraphs': ['A group lets you define policy and a configuration template once and reuse it for several clients.'],
'bullets': ['Groups can control Internet access, local-network access and additional allow/deny exceptions.',
'They can also provide default routes, DNS and Keepalive for new client configurations.',
'Changing group server policy applies immediately, but a configuration already installed on a phone is not silently '
'rewritten.',
'Apply the current group template and issue a new file/QR when the device configuration itself must change.'],
'example_title': 'Example',
'example_lines': ['Group “Guests”', 'Internet: allowed', 'LAN: blocked', 'Members: Phone-1, Tablet-1'],
'warning': ''},
{'title': 'Per-client policy',
'paragraphs': ['A client can inherit the group policy or add its own exceptions.'],
'bullets': ['A per-client allow or deny exception takes priority over the matching group exception.',
'This is useful when one employee needs a server that remains blocked for the rest of the group.'],
'example_title': 'Example',
'example_lines': ['Group blocks 192.168.1.0/24', 'Client additionally allows 192.168.1.50/32'],
'warning': ''},
{'title': 'Site-to-Site client',
'paragraphs': ['Use Site-to-Site when a peer represents an entire network. Enter the networks reachable behind that peer as '
'Remote Networks.'],
'bullets': ['WGTools adds those networks to server routing automatically.',
'They can later be selected for publication through Nodes.',
'A normal phone or laptop does not need Site-to-Site mode.'],
'example_title': 'Example',
'example_lines': ['Router peer: 10.0.0.20/32', 'Remote network: 192.168.50.0/24'],
'warning': ''},
{'title': 'Direct connection and VPS Relay',
'paragraphs': ['When VPS Relay is installed for the selected interface, a supported client can connect directly or through '
'Relay.'],
'bullets': ['Direct is best when the server WireGuard port is reachable from the Internet.',
'Relay helps behind CGNAT or when direct inbound UDP is unavailable.',
'The client VPN address and access policy remain unchanged.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'PSK, isolation and key rotation',
'paragraphs': ['WireGuard already uses public/private keys. An optional PSK adds another shared secret between server and '
'client.'],
'bullets': ['Client isolation blocks this client from talking to other VPN addresses in the same WireGuard pool.',
'Rotate keys creates a new key pair and a new PSK when PSK is enabled.',
'The old configuration stops working after rotation, so issue a new file or QR.',
'VPN address, group, schedule and traffic history are preserved.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Temporary access',
'paragraphs': ['A client can expire after 1, 3 or 6 hours, one day, or a custom date/time.'],
'bullets': ['When the time is reached, WGTools performs the selected expiration action.',
'Expiration is enforced automatically by a background service.',
'To re-enable a saved expired client, set a new expiration time or No limit.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Access schedule',
'paragraphs': ['A schedule automatically enables and blocks a client on selected days and times without replacing its '
'configuration.'],
'bullets': ['It uses the WireGuard server local time.',
'Intervals can cross midnight, for example 22:00–06:00.',
'When the allowed period starts again, WGTools restores the same peer.'],
'example_title': 'Example',
'example_lines': ['Mon–Fri: 08:00–19:00'],
'warning': ''},
{'title': 'Status, Endpoint and traffic',
'paragraphs': ['The table shows latest handshake, Endpoint and accumulated RX/TX.'],
'bullets': ['A recent handshake means the client communicated with the server recently.',
'A mobile phone Endpoint can change when moving between Wi-Fi and LTE; that is normal.',
'Quick search filters by name, address, group and state.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Configuration and QR',
'paragraphs': ['A .conf file is convenient for computers and routers; QR is convenient for the WireGuard mobile app.'],
'bullets': ['The client PrivateKey is inside the file and QR, so treat them like a password.',
'Reissuing a managed client configuration uses keys stored by WGTools.',
'After rotating keys, always issue a new configuration.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Edit and delete',
'paragraphs': ['WGTools backs up the WireGuard configuration before managed changes and applies them safely.'],
'bullets': ['Deleting a managed client removes its peer, saved keys and related managed rules.',
'A configuration already saved on the device is not erased remotely, but it can no longer connect.'],
'example_title': '',
'example_lines': [],
'warning': ''}]},
{'id': 'settings',
'title': 'Settings',
'intro': 'Settings contains appearance, backups, Telegram, mail, HTTPS, users, audit and application updates.',
'topics': [{'title': 'Appearance and language',
'paragraphs': ['Choose light, dark or system theme and the interface language.'],
'bullets': ['Collapse sidebar keeps only icons in the left navigation.',
'Sidebar state is stored in the current browser and changes immediately.',
'The interface language is saved by WGTools.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Status refresh',
'paragraphs': ['Refresh interval controls how often pages update server/client status. Online threshold controls how long after '
'a handshake a peer is considered connected.'],
'bullets': [],
'example_title': 'Example',
'example_lines': ['Refresh: 5 s', 'Online: 180 s'],
'warning': ''},
{'title': 'Automatic configuration backups',
'paragraphs': ['Before risky changes, WGTools keeps a history of WireGuard configurations. This is a quick rollback mechanism '
'for one interface.'],
'bullets': ['You can choose how many copies are retained.', 'This history is different from the full portable WGTools backup.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Full backup and restore',
'paragraphs': ['A .wgtbackup file is for migration to a new server or disaster recovery.'],
'bullets': ['It contains WireGuard configurations, users/settings database, groups, managed-client data, Telegram/SMTP settings '
'and the state needed to restore VPS Relay/Nodes.',
'Before restore, WGTools validates the archive and makes a safety backup of the current state.',
'If applying restored data fails, WGTools automatically attempts to roll back.',
'After a successful restore the current web session is cleared; sign in with an account from the restored '
'database.'],
'example_title': '',
'example_lines': [],
'warning': 'A .wgtbackup contains private keys, PSKs, password hashes, Telegram token and SMTP password. Store it like a '
'password.'},
{'title': 'Telegram Bot',
'paragraphs': ['Telegram can check and manage WireGuard without opening the web panel.'],
'bullets': ['Create a bot with @BotFather and paste its Bot Token.',
'Enable it and send /start.',
'If your Telegram user ID is not authorized yet, the bot shows the numeric ID. Add it to the allowed list.',
'Management commands are accepted only in private chats.',
'Available actions include server status, clients, create/delete, configuration/QR reissue and WireGuard controls.'],
'example_title': 'Example',
'example_lines': ['Default Endpoint: vpn.example.com', 'DNS: 1.1.1.1, 8.8.8.8'],
'warning': ''},
{'title': 'Mail / SMTP and password recovery',
'paragraphs': ['SMTP powers the Forgot password? flow on the sign-in page.'],
'bullets': ['STARTTLS, TLS/SSL and plain SMTP for a trusted local network are supported.',
'Username can be empty when the SMTP server does not require authentication.',
'The password is stored locally and is never returned to the browser.',
'The test button sends a message to the chosen test recipient.',
'Recovery codes are one-time, hashed, valid for 15 minutes and rate-limited.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Built-in HTTPS',
'paragraphs': ['WGTools can serve HTTPS directly without Nginx, Caddy or another reverse proxy.'],
'bullets': ['First enter the domain/public IP, e-mail, HTTPS port and private path, then click Obtain / renew certificate. That action also saves the entered HTTPS settings.',
'Until a suitable certificate exists, Enable built-in HTTPS stays unavailable. After successful issuance, enable it and click Save.',
'If the domain or public IP changes, WGTools requires a certificate for the new address before HTTPS can be enabled.',
'For issuance and renewal, TCP 80 must be reachable from the Internet to this server.',
'The panel uses the chosen HTTPS port, such as 443 or 8443.',
'Private path sets the panel URL, for example /MyWGTools/. Other paths return 404 while built-in HTTPS is enabled.',
'WGTools reports local port usage and never stops an unrelated web server.',
'A systemd timer renews the certificate automatically.'],
'example_title': 'Example',
'example_lines': ['https://wg.example.com/MyWGTools/'],
'warning': 'A private path does not replace authentication. Avoid exposing the panel unnecessarily and use strong credentials.'},
{'title': 'Users',
'paragraphs': ['The first user is created during initial WGTools setup. Additional users can be added in Settings.'],
'bullets': ['Users currently have equal management rights.',
'E-mail and password can be changed and users can be removed.',
'Each user can enable MFA for their own account with Google Authenticator or another TOTP-compatible app. WGTools shows a one-time set of recovery codes when MFA is enabled.',
'If the authenticator device is lost, root can disable MFA for a selected user from the wgtools CLI.',
'The current user and the last remaining user cannot be deleted.',
'Password change/recovery and enabling/disabling MFA invalidate older web sessions for that user.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'Audit',
'paragraphs': ['Audit shows meaningful web/Telegram administration actions and useful WireGuard connection history.'],
'bullets': ['Web actions record the WGTools username.',
'Telegram actions record @username when available and the numeric Telegram ID.',
'Configuration changes, client configuration/QR disclosure, updates and useful failures are recorded.',
'Passwords, private keys, PSKs, tokens and full configuration contents are not written to Audit.',
'The journal has limited retention and is cleaned automatically.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'WGTools updates',
'paragraphs': ['WGTools periodically checks stable GitHub Releases but never installs an update without explicit confirmation.'],
'bullets': ['An update notice appears in the sidebar when a newer version exists.',
'Before updating, WGTools creates a full .wgtbackup and a separate application rollback archive.',
'If the new application does not start, WGTools attempts to restore the previous version automatically.',
'The current version is shown in the UI and under About.'],
'example_title': '',
'example_lines': [],
'warning': ''},
{'title': 'wgtools command and emergency access',
'paragraphs': ['The root command wgtools is installed with the application and is useful when the web panel is unreachable.'],
'bullets': ['It shows WGTools, WireGuard, Nodes, Telegram, timer and local Relay Agent status plus the current panel URL.',
'It can start/stop/restart the panel and WireGuard and show logs.',
'If an HTTPS port or private path was configured incorrectly, the CLI can disable built-in HTTPS and restore HTTP access.',
'The Security section can emergency-disable MFA for a selected user if Google Authenticator and recovery codes are unavailable.',
'Uninstall WGTools removes the panel and its services while keeping normal WireGuard and reusable WGTools data for a later reinstall.',
'FULL CLEANUP wipes WGTools, local Relay and WireGuard from this host after an explicit DELETE ALL confirmation; Relay Agents on other VPS hosts are never touched.'],
'example_title': 'Example',
'example_lines': ['root@server:~# wgtools'],
'warning': ''},
{'title': 'Where data is stored',
'paragraphs': ['Manual editing is normally unnecessary, but these paths are useful for troubleshooting and backup planning.'],
'bullets': [],
'example_title': 'Main paths',
'example_lines': ['/etc/wireguard/wg0.conf — WireGuard configuration',
'/var/lib/wgtools/wgtools.db — users and settings',
'/var/lib/wgtools/clients/ — managed client data',
'/var/lib/wgtools/backups/ — configuration history',
'/var/lib/wgtools/update-backups/ — update rollback archives'],
'warning': ''}]}]}
HELP = {"pl": json.loads((Path(__file__).with_name("help_locales") / "pl.json").read_text(encoding="utf-8"))}
# Larger help articles are localized separately from short UI translation keys.
# The original Russian and English help above is retained as the reference/fallback.
import json as _help_json
from pathlib import Path as _HelpPath
_HELP_TRANSLATION_PATH = _HelpPath(__file__).with_name('help_locales')
for _help_lang in ('de', 'fr', 'it', 'es', 'pl'):
_help_file = _HELP_TRANSLATION_PATH / f'{_help_lang}.json'
# Missing/corrupt optional language resources must not break panel startup.
try:
_help_sections = _help_json.loads(_help_file.read_text(encoding='utf-8'))
if ([s['id'] for s in _help_sections] != [s['id'] for s in HELP['en']]
or any(len(s['topics']) != len(reference['topics'])
for s, reference in zip(_help_sections, HELP['en']))):
raise ValueError('help sections do not match reference')
HELP[_help_lang] = _help_sections
except (OSError, ValueError, KeyError, TypeError):
# Keep English as a safe fallback; release tests require every file to be valid.
pass
def get_help_sections(language: str) -> list[dict]:
return HELP.get(language) or HELP["en"]
return HELP["pl"]
-663
View File
@@ -1,663 +0,0 @@
[
{
"id": "dashboard",
"title": "Übersicht",
"intro": "Die Übersicht beantwortet drei Fragen: Läuft WireGuard, wer ist verbunden und arbeitet der Server fehlerfrei?",
"topics": [
{
"title": "Erste Schritte",
"paragraphs": [
"Oben wird die ausgewählte WireGuard-Schnittstelle angezeigt. Bei mehreren Schnittstellen beziehen sich die WGTools-Seiten auf die jeweils ausgewählte."
],
"bullets": [
"Start aktiviert WireGuard, Stopp hält es an und Neustart startet die Schnittstelle kurz neu.",
"Telefone und Computer verbinden sich danach normalerweise automatisch erneut.",
"Bei angehaltener Schnittstelle können ihre Clients keine Verbindung aufbauen."
],
"example_title": "Beispiel",
"example_lines": [
"wg0 · Home · 10.0.0.1/24 · UDP 51820"
],
"warning": ""
},
{
"title": "CPU, Arbeitsspeicher, Netzwerk und Laufzeit",
"paragraphs": [
"Diese Angaben beziehen sich auf den gesamten Debian-Server, nicht nur auf WireGuard."
],
"bullets": [
"CPU zeigt die aktuelle Prozessorlast, Arbeitsspeicher den belegten und gesamten RAM.",
"Netzwerk zeigt die momentane Empfangs- und Senderate der externen Schnittstelle.",
"Laufzeit ist die Zeit seit dem letzten Systemstart. Diagramme der letzten 24 Stunden helfen, auffällige Last und dauerhaften Datenverkehr zu erkennen."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Wer ist verbunden?",
"paragraphs": [
"WireGuard unterhält keine Sitzung wie eine Webseite. WGTools betrachtet einen Client als online, wenn sein letzter Handshake noch nicht zu lange zurückliegt."
],
"bullets": [
"Handshake ist der letzte erfolgreiche WireGuard-Kontrollaustausch; Endpoint bezeichnet öffentliche IP-Adresse und Port des Clients.",
"„Nie“ bedeutet, dass der Server noch keinen erfolgreichen Handshake dieses Peers gesehen hat.",
"Die Schnellsuche filtert nach Name, VPN-Adresse, Typ und Endpoint."
],
"example_title": "Beispiel",
"example_lines": [
"Telefon · 10.0.0.3/32",
"Endpoint: 203.0.113.25:63275",
"Handshake: vor 18 s"
],
"warning": ""
},
{
"title": "Datenverkehr",
"paragraphs": [
"WGTools speichert kumulierte RX/TX-Werte unabhängig von den temporären WireGuard-Zählern; Statistiken bleiben daher nach Neustarts von Schnittstelle oder Server erhalten."
],
"bullets": [
"Die Datenverkehr-Karte zeigt das Gesamtvolumen der ausgewählten Schnittstelle; jeder Client hat eigene RX/TX-Summen.",
"Zurücksetzen beginnt die Zählung ab diesem Zeitpunkt erneut.",
"RX/TX auf der Netzwerk-Karte ist die momentane Geschwindigkeit, nicht das Gesamtvolumen."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Mehrere WireGuard-Schnittstellen",
"paragraphs": [
"Ein Server kann mehrere unabhängige VPNs bereitstellen, etwa für Zuhause und Büro."
],
"bullets": [
"Der Wechsel oben verändert keine Konfiguration, sondern wählt nur, welche Schnittstelle Übersicht, Server und Clients anzeigen.",
"Jede Schnittstelle besitzt eigene Adressen, Ports, Clients, Routen und Zugriffsregeln."
],
"example_title": "Beispiel",
"example_lines": [
"wg0 · Home · 10.0.0.1/24",
"wg1 · Arbeit · 10.0.1.1/24"
],
"warning": ""
}
]
},
{
"id": "server",
"title": "Server",
"intro": "Hier werden WireGuard-Schnittstellen, Routing, Netzwerkzugriff, verknüpfte WGTools-Server über Nodes und der öffentliche Zugriff über VPS Relay verwaltet.",
"topics": [
{
"title": "VPN-Netze und WireGuard-Schnittstellen",
"paragraphs": [
"Eine WireGuard-Schnittstelle ist wie eine virtuelle Netzwerkkarte mit eigenem VPN-Subnetz. Jeder Client erhält daraus eine Adresse."
],
"bullets": [
"Systemnamen heißen gewöhnlich wg0, wg1 usw.; ein Anzeigename wie Home oder Office dient nur der Übersicht.",
"ListenPort ist der UDP-Port, über den Clients den Server erreichen.",
"MTU kann normalerweise auf Auto bleiben. Eine manuelle Einstellung ist nur bei Problemen mit bestimmten Netzen, LTE oder PPPoE sinnvoll."
],
"example_title": "Beispiel",
"example_lines": [
"VPN-Netz: 10.0.0.0/24",
"Serveradresse: 10.0.0.1/24",
"Clients: 10.0.0.2, 10.0.0.3, ...",
"Port: UDP 51820"
],
"warning": ""
},
{
"title": "Ersteinrichtung und weitere Schnittstellen",
"paragraphs": [
"Auf einem frischen Debian-System kann WGTools WireGuard installieren und die erste Schnittstelle per Assistent anlegen. Weitere wie wg1 und wg2 lassen sich später hinzufügen."
],
"bullets": [
"WGTools schlägt ein freies VPN-Subnetz, einen UDP-Port und eine Policy-Routing-Tabelle vor.",
"Überschneidungen von Netzen und bereits belegte Ports werden vorab geprüft.",
"Jede Schnittstelle bekommt eigene Schlüssel und Konfiguration. Vor dem Löschen wird eine Sicherung erstellt und die zugehörigen verwalteten Daten werden entfernt."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "NAT einfach erklärt",
"paragraphs": [
"NAT/MASQUERADE ist hilfreich, wenn ein VPN-Client LAN oder Internet mit der Quelladresse des WireGuard-Servers erreichen soll. Für Heimnetze ist das oft die einfachste Lösung."
],
"bullets": [
"Mit NAT benötigt der Heimrouter normalerweise keine gesonderte Rückroute zum VPN-Subnetz.",
"Ohne NAT müssen benachbarte Router die Rückroute für das VPN-Netz kennen."
],
"example_title": "Beispiel",
"example_lines": [
"Telefon 10.0.0.3 → WGTools 192.168.1.10 → Internet",
"Heimrouter sieht Quelladresse 192.168.1.10"
],
"warning": ""
},
{
"title": "Routen und Policy Routing",
"paragraphs": [
"Eine Route legt fest, über welche Schnittstelle oder welches Gateway Linux ein Netz erreicht. Policy Routing ermöglicht gesonderte Routing-Tabellen, zum Beispiel für VPN-Clientverkehr."
],
"bullets": [
"Einfache Heiminstallationen benötigen häufig keine eigene Policy-Tabelle.",
"Sie ist nützlich bei einem bestimmten Gateway, einem weiteren VPN oder einem eigenen WAN.",
"WGTools trennt System-, Site-to-Site- und manuelle Routen. Eigene Routen können angelegt, bearbeitet und gelöscht werden."
],
"example_title": "Beispiel",
"example_lines": [
"Quelle: 10.0.0.0/24",
"Tabelle: 200",
"Default via: 192.168.1.1 dev eth0"
],
"warning": ""
},
{
"title": "Firewall und Netzwerkzugriff",
"paragraphs": [
"Die Firewall entscheidet, ob Verkehr erlaubt ist; Routing bestimmt lediglich den Weg. Das sind unterschiedliche Funktionen."
],
"bullets": [
"Der Zugang einzelner VPN-Clients zu bestimmten Netzen kann erlaubt oder gesperrt werden.",
"WGTools erzeugt Gruppenregeln und clientbezogene Ausnahmen automatisch.",
"Vor Änderungen wird die Konfiguration gesichert; wenn WireGuard nicht startet, wird die vorherige Version wiederhergestellt."
],
"example_title": "Beispiel",
"example_lines": [
"10.0.0.6/32 → sperren → 192.168.1.0/24",
"Andere Clients können das LAN weiterhin erreichen"
],
"warning": ""
},
{
"title": "Site-to-Site: zwei Netze verbinden",
"paragraphs": [
"Site-to-Site eignet sich für einen Peer, hinter dem ein ganzes entferntes Netz liegt, statt nur ein Telefon oder Laptop."
],
"bullets": [
"Trage diese Netze unter Entfernte Netze ein; WGTools legt die Routen automatisch an.",
"Wenn der Peer offline geht, bleiben die konfigurierten Routen bestehen.",
"Auch die Gegenseite benötigt eine Rückroute über WireGuard."
],
"example_title": "Beispiel",
"example_lines": [
"Home: 192.168.1.0/24",
"Büro-Peer: 10.0.0.20/32",
"Büro-LAN: 192.168.50.0/24",
"Ergebnis: Heimgeräte erreichen 192.168.50.x"
],
"warning": ""
},
{
"title": "Nodes: WGTools-Server verknüpfen",
"paragraphs": [
"Nodes verbindet mehrere WGTools-Installationen über einen eigenen internen WireGuard-Tunnel. Ein Server ist der HUB; andere werden mit einem einmaligen Code gekoppelt."
],
"bullets": [
"Der HUB verwendet dieselbe Portnummer für UDP (WireGuard) und TCP (geschützte Erstkopplung). Danach erfolgt die Synchronisierung über wgnode0, unabhängig von Panel-URL, HTTPS-Port oder privatem Pfad.",
"WGTools erkennt VPN-, Site-to-Site- und lokale Netze. Veröffentliche nur benötigte Netze. Später erkannte Netze müssen ausdrücklich hinzugefügt werden; Änderungen bestehender Netze lösen einen Hinweis zur Überprüfung aus.",
"Veröffentlichte Netze unterschiedlicher Nodes dürfen sich nicht überschneiden, z. B. 10.0.0.0/24 an zwei Standorten. Bei Konflikten wird die Änderung blockiert.",
"Details zeigt entfernte Netze und Clients schreibgeschützt. Jede Veröffentlichung macht das Netz für verbundene Nodes erreichbar — gib nur das Nötige frei."
],
"example_title": "Beispiel: home + VPS",
"example_lines": [
"HUB: vpn.example.com:51950",
"Heimnetz veröffentlicht: 192.168.1.0/24",
"VPS veröffentlicht: 10.20.0.0/24",
"Nach der Kopplung routen beide Seiten über wgnode0"
],
"warning": ""
},
{
"title": "VPS Relay: wenn zuhause eine öffentliche IP fehlt",
"paragraphs": [
"VPS Relay hilft bei CGNAT oder wenn Clients den Heimserver nicht direkt erreichen. Ein öffentlicher VPS dient als Einstiegspunkt; WireGuard-Server und Zugriffsregeln bleiben auf dem WGTools-Host."
],
"bullets": [
"VPS über SSH hinzufügen: WGTools prüft Host und Ports und installiert anschließend den Relay Agent.",
"Ein Agent kann mehrere unabhängige WGTools-Controller mit getrennten Schlüsseln und Verbindungen bedienen.",
"Unterstützte Clients können direkt oder über Relay verbinden. Wird der VPS aus WGTools entfernt, wird nur der lokale Transport getrennt; Agent und gespeicherter Mandant bleiben für eine spätere Wiederverbindung bestehen.",
"Relay bietet einen öffentlichen Zugang für Clients, Nodes verknüpft dagegen WGTools-Server und deren Netze."
],
"example_title": "Beispiel",
"example_lines": [
"Telefon → öffentlicher VPS → geschützter Relay-Transport → WGTools zuhause → gewünschtes Netz"
],
"warning": ""
},
{
"title": "Diagnose",
"paragraphs": [
"Die Diagnose kontrolliert WireGuard, IP-Weiterleitung, Ports, Routen und Dienste. Sie hilft, wenn ein Client nicht verbinden oder ein Zielnetz nicht erreichen kann."
],
"bullets": [
"Prüfe zuerst die laufende Schnittstelle und einen aktuellen Handshake. Klappt der Handshake, liegt das Problem häufig bei Routing, Firewall oder Rückweg.",
"Server → Route zeigt Traceroute-Hops, mittlere RTT und die Zunahme der Verzögerung. Fehlende Traceroute-Antworten werden neutral angezeigt, nicht als eindeutiger Ausfall.",
"Die interaktive Karte lässt sich verschieben und zoomen; ein Klick zeigt IP, ungefähren Standort, ASN/Anbieter und RTT.",
"Bei aktivierter Karte werden öffentliche Hop-IPs über ipwho.is geolokalisiert und Kartenkacheln von OpenStreetMap geladen; private IPs werden nicht zur Geolokalisierung gesendet. Traceroute misst keine Bandbreite in Mbit/s.",
"Die Diagnose selbst ändert keine Konfiguration."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Änderungen sicher anwenden",
"paragraphs": [
"Änderungen an Server, Routen und Firewall können WireGuard kurz neu starten."
],
"bullets": [
"WGTools erstellt zuerst eine Konfigurationssicherung.",
"Falls die neue Konfiguration nicht startet, versucht WGTools automatisch zur vorherigen zurückzukehren.",
"Clients können kurz getrennt werden und verbinden sich üblicherweise selbst wieder."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Registerkarte Konfiguration",
"paragraphs": [
"Hier kannst du /etc/wireguard/<interface>.conf direkt bearbeiten, falls die normalen Formulare eine Einstellung nicht anbieten."
],
"bullets": [
"Verwende diesen Editor nur mit Kenntnissen der WireGuard-Syntax und PostUp/PostDown-Befehle.",
"Vor Anwendung validiert und sichert WGTools die Datei.",
"Bei ungewöhnlichen Konfigurationen kann die automatische Bearbeitung eingeschränkt sein, um manuelle Regeln zu schützen. PrivateKey, PresharedKey und andere Geheimnisse niemals veröffentlichen."
],
"example_title": "Beispiel",
"example_lines": [
"[Interface]",
"Address = 10.0.0.1/24",
"ListenPort = 51820",
"",
"[Peer]",
"AllowedIPs = 10.0.0.2/32"
],
"warning": "PrivateKey, PresharedKey und andere Geheimnisse niemals veröffentlichen."
}
]
},
{
"id": "clients",
"title": "Clients",
"intro": "Ein Client kann ein Telefon, Laptop, Router oder anderer WireGuard-Peer sein. Hier verwaltest du Konfigurationen, Zugriff, Ablaufzeiten, Zeitpläne und Site-to-Site-Verbindungen.",
"topics": [
{
"title": "Normaler Client",
"paragraphs": [
"Für ein Telefon oder einen Computer wähle Client. WGTools vergibt eine freie VPN-Adresse und erstellt die Schlüssel."
],
"bullets": [
"Der Name ist nur eine Bezeichnung innerhalb von WGTools.",
"Der Endpoint in der erzeugten Konfiguration ist die Adresse, unter der das Gerät deinen WireGuard-Server findet.",
"DNS kann pro Client angegeben oder aus einer Gruppenvorlage übernommen werden."
],
"example_title": "Beispiel",
"example_lines": [
"Name: Telefon",
"VPN-Adresse: 10.0.0.3/32",
"Endpoint: vpn.example.com:51820"
],
"warning": ""
},
{
"title": "VPN-Verkehr und AllowedIPs",
"paragraphs": [
"AllowedIPs in der Clientkonfiguration legt fest, welche Ziele das Gerät durch den Tunnel sendet. Dies ist unabhängig von der Zugriffsregel auf dem Server."
],
"bullets": [
"Gesamter Verkehr leitet Internet- und entfernten Netzverkehr durch das VPN; alternativ lassen sich einzelne Netze auswählen.",
"Mit der Ausnahme für lokale Netze bleiben Drucker und Router vor Ort direkt erreichbar, obwohl der Internetverkehr durch das VPN läuft.",
"Serverregeln können Ziele auch dann sperren, wenn sie in AllowedIPs enthalten sind."
],
"example_title": "Beispiel",
"example_lines": [
"0.0.0.0/0 — gesamter IPv4-Verkehr über VPN",
"192.168.50.0/24 — nur ein entferntes Netz"
],
"warning": ""
},
{
"title": "Clientgruppen",
"paragraphs": [
"Eine Gruppe bündelt gemeinsame Zugriffsregeln und eine Konfigurationsvorlage für mehrere Clients."
],
"bullets": [
"Gruppen steuern Internet-/LAN-Zugriff und individuelle Erlaubnis-/Sperrausnahmen.",
"Außerdem können sie Standardrouten, DNS und Keepalive für neue Konfigurationen vorgeben.",
"Serverseitige Gruppenregeln wirken sofort. Eine bereits auf dem Telefon installierte Konfiguration wird aber nicht stillschweigend geändert; bei Bedarf Vorlage anwenden und eine neue Datei oder einen QR-Code ausgeben."
],
"example_title": "Beispiel",
"example_lines": [
"Gruppe „Gäste“",
"Internet: erlaubt",
"LAN: gesperrt",
"Mitglieder: Telefon-1, Tabellet-1"
],
"warning": ""
},
{
"title": "Regeln pro Client",
"paragraphs": [
"Ein Client kann die Gruppenregeln übernehmen oder eigene Ausnahmen festlegen."
],
"bullets": [
"Eine clientbezogene Erlaubnis oder Sperre hat Vorrang vor der entsprechenden Gruppenausnahme.",
"So kann beispielsweise ein Mitarbeiter einen Server erreichen, der für die restliche Gruppe gesperrt ist."
],
"example_title": "Beispiel",
"example_lines": [
"Gruppe sperrt 192.168.1.0/24",
"Client erlaubt zusätzlich 192.168.1.50/32"
],
"warning": ""
},
{
"title": "Site-to-Site-Client",
"paragraphs": [
"Wähle Site-to-Site, wenn ein Peer ein ganzes Netz repräsentiert. Trage die dahinterliegenden Netze als Entfernte Netze ein."
],
"bullets": [
"WGTools ergänzt die nötigen Serverrouten automatisch.",
"Diese Netze können später über Nodes veröffentlicht werden.",
"Ein gewöhnliches Telefon oder Laptop benötigt keinen Site-to-Site-Modus."
],
"example_title": "Beispiel",
"example_lines": [
"Router-Peer: 10.0.0.20/32",
"Entferntes Netz: 192.168.50.0/24"
],
"warning": ""
},
{
"title": "Direkte Verbindung und VPS Relay",
"paragraphs": [
"Ist VPS Relay für die Schnittstelle installiert, können unterstützte Clients direkt oder über Relay verbinden."
],
"bullets": [
"Direkt ist ideal, wenn der WireGuard-Port aus dem Internet erreichbar ist.",
"Relay hilft bei CGNAT und wenn eingehendes UDP nicht möglich ist.",
"VPN-Adresse und Zugriffsregeln des Clients bleiben gleich."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "PSK, Isolation und Schlüsselwechsel",
"paragraphs": [
"WireGuard nutzt ohnehin öffentliche und private Schlüssel. Ein optionaler PSK ergänzt ein weiteres gemeinsames Geheimnis."
],
"bullets": [
"Clientisolation verhindert Verbindungen zu anderen VPN-Adressen desselben WireGuard-Pools.",
"Schlüsselwechsel erzeugt ein neues Schlüsselpaar und bei aktivem PSK auch einen neuen PSK. Die alte Konfiguration funktioniert danach nicht mehr: Neue Datei oder QR ausgeben.",
"VPN-Adresse, Gruppe, Zeitplan und Verkehrsstatistik bleiben erhalten."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Zeitlich begrenzter Zugriff",
"paragraphs": [
"Ein Client kann nach 1, 3 oder 6 Stunden, einem Tag oder zu einem frei gewählten Zeitpunkt ablaufen."
],
"bullets": [
"Zum Ablaufzeitpunkt führt der Hintergrunddienst die gewählte Aktion aus.",
"Zum Reaktivieren eines gespeicherten abgelaufenen Clients eine neue Ablaufzeit oder Ohne Begrenzung einstellen."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Zugriffszeitplan",
"paragraphs": [
"Ein Zeitplan erlaubt oder sperrt einen Client automatisch an ausgewählten Tagen und Uhrzeiten, ohne seine Konfiguration auszutauschen."
],
"bullets": [
"Maßgeblich ist die lokale Uhrzeit des WireGuard-Servers.",
"Zeitfenster können über Mitternacht reichen, etwa 22:00–06:00.",
"Mit Beginn des nächsten erlaubten Zeitfensters stellt WGTools denselben Peer wieder her."
],
"example_title": "Beispiel",
"example_lines": [
"Mo–Fr: 08:00–19:00"
],
"warning": ""
},
{
"title": "Status, Endpoint und Verkehr",
"paragraphs": [
"Die Tabelle zeigt den letzten Handshake, Endpoint und die kumulierten RX/TX-Werte."
],
"bullets": [
"Ein neuer Handshake zeigt, dass der Client kürzlich mit dem Server kommuniziert hat.",
"Der Endpoint eines Smartphones kann beim Wechsel zwischen WLAN und LTE wechseln; das ist normal.",
"Die Schnellsuche filtert nach Name, Adresse, Gruppe und Status."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Konfigurationsdatei und QR-Code",
"paragraphs": [
"Eine .conf-Datei eignet sich für Computer und Router; QR-Codes für die WireGuard-App auf Smartphones."
],
"bullets": [
"Der PrivateKey des Clients steht sowohl in der Datei als auch im QR-Code. Beides wie ein Passwort schützen.",
"Erneutes Ausgeben einer verwalteten Clientkonfiguration verwendet die in WGTools gespeicherten Schlüssel.",
"Nach einem Schlüsselwechsel immer eine neue Konfiguration ausgeben."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Bearbeiten und Löschen",
"paragraphs": [
"Vor verwalteten Änderungen sichert WGTools die WireGuard-Konfiguration und übernimmt Änderungen kontrolliert."
],
"bullets": [
"Das Löschen eines verwalteten Clients entfernt Peer, gespeicherte Schlüssel und zugehörige Regeln.",
"Eine bereits auf dem Gerät gespeicherte Datei wird nicht aus der Ferne gelöscht, kann aber keine Verbindung mehr aufbauen."
],
"example_title": "",
"example_lines": [],
"warning": ""
}
]
},
{
"id": "settings",
"title": "Einstellungen",
"intro": "Hier findest du Darstellung, Sicherungen, Telegram, E-Mail, HTTPS, Benutzer, Audit und Anwendungsupdates.",
"topics": [
{
"title": "Darstellung und Sprache",
"paragraphs": [
"Wähle helles, dunkles oder systemabhängiges Design sowie die Sprache."
],
"bullets": [
"Die eingeklappte Seitenleiste zeigt nur Navigationssymbole.",
"Die Seitenleistenansicht wird im aktuellen Browser gespeichert und sofort aktualisiert.",
"Die gewählte Sprache speichert WGTools."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Statusaktualisierung",
"paragraphs": [
"Das Aktualisierungsintervall bestimmt, wie häufig Server- und Clientstatus neu geladen werden. Die Online-Schwelle legt fest, wie lange nach einem Handshake ein Peer als verbunden gilt."
],
"bullets": [],
"example_title": "Beispiel",
"example_lines": [
"Aktualisierung: 5 s",
"Online: 180 s"
],
"warning": ""
},
{
"title": "Automatische Konfigurationssicherungen",
"paragraphs": [
"WGTools legt vor riskanten Änderungen eine Historie der WireGuard-Konfigurationen an, um einzelne Änderungen schnell zurückzunehmen."
],
"bullets": [
"Du kannst die Anzahl aufbewahrter Versionen bestimmen.",
"Diese Historie ist nicht mit der vollständigen portablen WGTools-Sicherung identisch."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Vollständige Sicherung und Wiederherstellung",
"paragraphs": [
"Eine .wgtbackup-Datei dient dem Umzug auf einen anderen Server oder der Wiederherstellung nach Ausfällen."
],
"bullets": [
"Sie enthält WireGuard-Konfigurationen, Benutzer-/Einstellungsdatenbank, Gruppen, verwaltete Clients, Telegram-/SMTP-Einstellungen sowie Daten zum Wiederherstellen von VPS Relay und Nodes.",
"WGTools prüft das Archiv und erstellt vor dem Import eine Sicherheitssicherung. Schlägt das Einspielen fehl, versucht es einen Rollback.",
"Nach erfolgreicher Wiederherstellung endet die aktuelle Websitzung; melde dich mit einem Konto aus der wiederhergestellten Datenbank an."
],
"example_title": "",
"example_lines": [],
"warning": ".wgtbackup enthält private Schlüssel, PSKs, Passwort-Hashes, Telegram-Token und SMTP-Passwort. Wie ein Passwort aufbewahren."
},
{
"title": "Telegram-Bot",
"paragraphs": [
"Telegram erlaubt WireGuard-Abfragen und Verwaltungsaktionen, ohne die Weboberfläche zu öffnen."
],
"bullets": [
"Erstelle mit @BotFather einen Bot, füge den Token ein, aktiviere ihn und sende /start.",
"Ist deine Telegram-Benutzer-ID noch nicht freigegeben, zeigt der Bot die numerische ID an. Füge sie zur Freigabeliste hinzu.",
"Administrative Befehle funktionieren nur in privaten Chats: Status, Clients, Anlegen/Löschen, Datei-/QR-Ausgabe und WireGuard-Steuerung."
],
"example_title": "Beispiel",
"example_lines": [
"Standard-Endpoint: vpn.example.com",
"DNS: 1.1.1.1, 8.8.8.8"
],
"warning": ""
},
{
"title": "E-Mail / SMTP und Passwortwiederherstellung",
"paragraphs": [
"SMTP ermöglicht „Passwort vergessen?“ auf der Anmeldeseite."
],
"bullets": [
"Unterstützt werden STARTTLS, TLS/SSL und unverschlüsseltes SMTP in einem vertrauenswürdigen LAN. Der Benutzername darf leer bleiben, wenn der SMTP-Server keine Authentifizierung braucht.",
"Das Kennwort bleibt lokal und wird nie an den Browser zurückgegeben. Die Testschaltfläche versendet eine E-Mail an die angegebene Testadresse.",
"Wiederherstellungscodes sind einmalig, gehasht, 15 Minuten gültig und gegen zu viele Versuche geschützt."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Integriertes HTTPS",
"paragraphs": [
"WGTools kann HTTPS ohne Nginx, Caddy oder externen Reverse-Proxy selbst bereitstellen."
],
"bullets": [
"Gib Domain/öffentliche IP, E-Mail, HTTPS-Port und privaten Pfad ein und wähle Zertifikat anfordern/erneuern. Dabei werden die HTTPS-Einstellungen gespeichert.",
"HTTPS lässt sich erst mit einem passenden Zertifikat aktivieren. Nach erfolgreicher Ausstellung die Option einschalten und Speichern wählen; bei geänderter Domain/IP wird ein neues Zertifikat benötigt.",
"TCP 80 muss für Ausstellung und Erneuerung aus dem Internet erreichbar sein. Das Panel läuft auf dem ausgewählten HTTPS-Port (z. B. 443 oder 8443). Ein privater Pfad wie /MyWGTools/ bestimmt die URL; andere Pfade liefern bei aktiviertem HTTPS 404.",
"WGTools zeigt lokale Portbelegung und stoppt keine fremden Webserver; ein systemd-Timer erneuert Zertifikate automatisch.",
"Der private Pfad ersetzt keine Anmeldung. Panel nicht unnötig öffentlich freigeben und starke Zugangsdaten verwenden."
],
"example_title": "Beispiel",
"example_lines": [
"https://wg.example.com/MyWGTools/"
],
"warning": "Ein privater Pfad ersetzt keine Anmeldung. Stelle das Panel nicht unnötig öffentlich bereit und verwende sichere Zugangsdaten."
},
{
"title": "Benutzer",
"paragraphs": [
"Das erste Konto wird bei der WGTools-Einrichtung erstellt; weitere lassen sich unter Einstellungen hinzufügen."
],
"bullets": [
"Derzeit haben alle Benutzer dieselben Verwaltungsrechte. E-Mail und Passwort können geändert und Konten entfernt werden.",
"Jeder Benutzer kann MFA über Google Authenticator oder eine kompatible TOTP-App aktivieren. Dabei werden einmalig Wiederherstellungscodes angezeigt.",
"Geht der Authenticator verloren, kann root MFA für den Benutzer über die wgtools-CLI deaktivieren. Das eigene und das letzte verbliebene Konto können nicht gelöscht werden.",
"Passwortänderung/-wiederherstellung und Änderung des MFA-Status machen ältere Websitzungen ungültig."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Audit-Protokoll",
"paragraphs": [
"Audit protokolliert wichtige Web- und Telegram-Verwaltungsaktionen sowie die WireGuard-Verbindungshistorie."
],
"bullets": [
"Webaktionen enthalten den WGTools-Benutzernamen; Telegram-Aktionen wenn verfügbar @username und die numerische Telegram-ID.",
"Konfigurationsänderungen, Abrufe von Clientdateien/QR, Updates und relevante Fehler werden protokolliert.",
"Passwörter, private Schlüssel, PSKs, Tokens und komplette Konfigurationen werden nicht erfasst. Das Protokoll wird nach der Aufbewahrungsfrist automatisch bereinigt."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "WGTools-Updates",
"paragraphs": [
"WGTools prüft regelmäßig stabile GitHub-Releases und installiert Updates nur nach ausdrücklicher Bestätigung."
],
"bullets": [
"Bei neuer Version erscheint eine Benachrichtigung.",
"Vor dem Update entstehen eine vollständige .wgtbackup und ein gesondertes Archiv für den Rückweg zur alten Anwendungsversion.",
"Startet die neue Version nicht, versucht WGTools die vorherige wiederherzustellen. Die installierte Version steht in der Oberfläche und unter Über."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Der Befehl wgtools und Notfallzugriff",
"paragraphs": [
"Der root-Befehl wgtools hilft, wenn das Webpanel nicht erreichbar ist."
],
"bullets": [
"Er zeigt WGTools-, WireGuard-, Nodes-, Telegram-, Timer- und lokalen Relay-Agent-Status sowie die aktuelle Panel-URL.",
"Er kann Panel und WireGuard starten, stoppen und neu starten sowie Logs anzeigen. Bei falschem HTTPS-Port oder privatem Pfad kann er integriertes HTTPS abschalten und HTTP wiederherstellen.",
"Bei Verlust von Authenticator und Codes lässt sich die MFA eines Benutzers notfallmäßig deaktivieren.",
"Deinstallieren entfernt Panel und Dienste, erhält aber normales WireGuard und Daten für eine spätere Neuinstallation. FULL CLEANUP löscht nach Bestätigung mit DELETE ALL WGTools, lokales Relay und WireGuard; fremde VPS-Relay-Agents bleiben unberührt."
],
"example_title": "Beispiel",
"example_lines": [
"root@server:~# wgtools"
],
"warning": ""
},
{
"title": "Wo Daten gespeichert werden",
"paragraphs": [
"Manuelles Bearbeiten ist meist unnötig. Die Pfade helfen aber bei Fehlersuche und Backupplanung."
],
"bullets": [],
"example_title": "Wichtige Pfade",
"example_lines": [
"/etc/wireguard/wg0.conf — WireGuard-Konfiguration",
"/var/lib/wgtools/wgtools.db — Benutzer und Einstellungen",
"/var/lib/wgtools/clients/ — verwaltete Clientdaten",
"/var/lib/wgtools/backups/ — Konfigurationsverlauf",
"/var/lib/wgtools/update-backups/ — Archive für Update-Rollback"
],
"warning": ""
}
]
}
]
-663
View File
@@ -1,663 +0,0 @@
[
{
"id": "dashboard",
"title": "Panel principal",
"intro": "El panel principal responde a tres preguntas: ¿está funcionando WireGuard, quién está conectado y se encuentra bien el servidor?",
"topics": [
{
"title": "Primeros pasos",
"paragraphs": [
"La barra superior muestra la interfaz WireGuard seleccionada. Si hay varias, las páginas de WGTools trabajan con la interfaz activa."
],
"bullets": [
"Iniciar activa WireGuard, Detener lo desactiva y Reiniciar reinicia brevemente la interfaz.",
"Los teléfonos y equipos suelen reconectarse automáticamente después de un reinicio.",
"Cuando la interfaz está detenida, sus clientes no pueden conectarse."
],
"example_title": "Ejemplo",
"example_lines": [
"wg0 · Home · 10.0.0.1/24 · UDP 51820"
],
"warning": ""
},
{
"title": "CPU, memoria, red y tiempo activo",
"paragraphs": [
"Estos indicadores describen todo el servidor Debian, no solo WireGuard."
],
"bullets": [
"CPU muestra la carga actual del procesador y Memoria la RAM utilizada y total.",
"Red indica las velocidades actuales de recepción y envío de la interfaz externa.",
"El tiempo activo cuenta desde el último arranque del sistema; las gráficas de 24 horas ayudan a detectar carga anómala o tráfico sostenido."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Quién está conectado",
"paragraphs": [
"WireGuard no mantiene una sesión como una página web. WGTools considera que un cliente está en línea si su último handshake es suficientemente reciente."
],
"bullets": [
"Handshake es el último intercambio de control WireGuard correcto; Endpoint representa la IP pública y el puerto del cliente.",
"«Nunca» indica que el servidor aún no ha visto un handshake válido de ese peer.",
"La búsqueda rápida filtra por nombre, dirección VPN, tipo y Endpoint."
],
"example_title": "Ejemplo",
"example_lines": [
"Teléfono · 10.0.0.3/32",
"Endpoint: 203.0.113.25:63275",
"Handshake: hace 18 s"
],
"warning": ""
},
{
"title": "Tráfico",
"paragraphs": [
"WGTools guarda los totales RX/TX por separado de los contadores temporales de WireGuard, por lo que las estadísticas sobreviven a reinicios de la interfaz o del servidor."
],
"bullets": [
"La tarjeta Tráfico muestra el volumen acumulado de la interfaz elegida y cada cliente mantiene sus propios totales RX/TX.",
"Restablecer inicia un nuevo conteo desde el momento actual.",
"RX/TX en la tarjeta Red representa la velocidad instantánea, no los datos acumulados."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Varias interfaces WireGuard",
"paragraphs": [
"Un mismo servidor puede alojar varias VPN independientes, como la de casa y la del trabajo."
],
"bullets": [
"Cambiar el selector superior no modifica la configuración: solo elige qué interfaz muestran las páginas Panel, Servidor y Clientes.",
"Cada interfaz tiene sus direcciones, puerto, clientes, rutas y reglas de acceso."
],
"example_title": "Ejemplo",
"example_lines": [
"wg0 · Home · 10.0.0.1/24",
"wg1 · Trabajo · 10.0.1.1/24"
],
"warning": ""
}
]
},
{
"id": "server",
"title": "Servidor",
"intro": "Aquí se gestiona WireGuard: interfaces, rutas, acceso a redes, conexión entre servidores mediante Nodes y acceso público con VPS Relay.",
"topics": [
{
"title": "Redes VPN e interfaces WireGuard",
"paragraphs": [
"Una interfaz WireGuard es como una tarjeta de red virtual con su propia subred VPN. Cada cliente recibe una dirección de esa red."
],
"bullets": [
"Los nombres del sistema suelen ser wg0, wg1, etc. Un nombre visible como Home u Office solo facilita identificarlos.",
"ListenPort es el puerto UDP al que se conectan los clientes.",
"Normalmente se puede dejar MTU en Auto; solo conviene cambiarlo a mano por problemas con ciertas redes, LTE o PPPoE."
],
"example_title": "Ejemplo",
"example_lines": [
"Red VPN: 10.0.0.0/24",
"Dirección del servidor: 10.0.0.1/24",
"Clientes: 10.0.0.2, 10.0.0.3, ...",
"Puerto: UDP 51820"
],
"warning": ""
},
{
"title": "Configuración inicial y nuevas interfaces",
"paragraphs": [
"En un Debian limpio, WGTools puede instalar WireGuard y crear la primera interfaz mediante un asistente. Después puedes añadir wg1, wg2 y otras."
],
"bullets": [
"WGTools sugiere una subred VPN libre, un puerto UDP y una tabla de enrutamiento por políticas.",
"Comprueba las subredes superpuestas y los puertos ocupados antes de crearla.",
"Cada interfaz obtiene sus propias claves y configuración. Al eliminarla se crea antes una copia de seguridad y se retiran los datos gestionados relacionados."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "NAT explicado de forma sencilla",
"paragraphs": [
"NAT/MASQUERADE permite que un cliente VPN acceda a la LAN o a Internet usando la dirección del servidor WireGuard como origen. Suele ser la opción más simple en casa."
],
"bullets": [
"Con NAT activado, el router doméstico normalmente no necesita una ruta de retorno específica hacia la subred VPN.",
"Sin NAT, el enrutamiento real requiere rutas de retorno en los routers vecinos."
],
"example_title": "Ejemplo",
"example_lines": [
"Teléfono 10.0.0.3 → WGTools 192.168.1.10 → Internet",
"El router de casa ve el origen 192.168.1.10"
],
"warning": ""
},
{
"title": "Rutas y enrutamiento por políticas",
"paragraphs": [
"Una ruta indica a Linux qué interfaz o puerta de enlace utilizar para llegar a una red. El enrutamiento por políticas permite elegir otra tabla para tráfico concreto, como los clientes VPN."
],
"bullets": [
"Una instalación doméstica sencilla generalmente no necesita una tabla independiente.",
"Es útil si los clientes deben usar una puerta de enlace determinada, otra VPN o una WAN separada.",
"WGTools distingue rutas del sistema, Site-to-Site y manuales. Las rutas personalizadas pueden crearse, editarse y eliminarse."
],
"example_title": "Ejemplo",
"example_lines": [
"Origen: 10.0.0.0/24",
"Tabla: 200",
"Default via: 192.168.1.1 dev eth0"
],
"warning": ""
},
{
"title": "Cortafuegos y acceso a la red",
"paragraphs": [
"El cortafuegos determina si el tráfico está permitido; el enrutamiento solo establece adónde enviarlo. Son funciones distintas."
],
"bullets": [
"Puedes permitir o bloquear el acceso de un cliente VPN a determinadas redes.",
"WGTools genera automáticamente reglas de grupos y excepciones individuales.",
"Antes de aplicar cambios crea una copia de seguridad y restaura la anterior si WireGuard no arranca."
],
"example_title": "Ejemplo",
"example_lines": [
"10.0.0.6/32 → bloquear → 192.168.1.0/24",
"Los demás clientes aún pueden acceder a la LAN"
],
"warning": ""
},
{
"title": "Site-to-Site: unir dos redes",
"paragraphs": [
"Site-to-Site sirve para un peer que representa una red remota completa en lugar de un teléfono o portátil."
],
"bullets": [
"Indica las redes detrás del peer en Redes remotas y WGTools creará las rutas automáticamente.",
"Si el peer pasa a offline, esas rutas configuradas no desaparecen.",
"El lado remoto también debe tener una ruta de retorno por WireGuard."
],
"example_title": "Ejemplo",
"example_lines": [
"Home: 192.168.1.0/24",
"Peer de oficina: 10.0.0.20/32",
"LAN de oficina: 192.168.50.0/24",
"Resultado: los equipos de casa pueden acceder a 192.168.50.x"
],
"warning": ""
},
{
"title": "Nodes: conectar servidores WGTools",
"paragraphs": [
"Nodes conecta varias instalaciones WGTools mediante un túnel WireGuard interno dedicado. Una actúa como HUB y las demás se unen con un código de un solo uso."
],
"bullets": [
"El HUB utiliza el mismo número de puerto en UDP para WireGuard y TCP para el emparejamiento inicial seguro. Después la sincronización viaja por wgnode0 sin depender de la URL del panel, el puerto HTTPS o la ruta privada.",
"WGTools detecta redes VPN, Site-to-Site y LAN: publica solo las necesarias. Las redes detectadas posteriormente deben añadirse expresamente; cualquier cambio genera un aviso para revisar la lista.",
"Las redes publicadas por diferentes Nodes no deben superponerse (por ejemplo 10.0.0.0/24 en dos ubicaciones); WGTools bloquea los conflictos.",
"Detalles muestra las redes y los clientes remotos en modo de solo lectura. Publicar una red la hace accesible a los nodos conectados: comparte solo lo imprescindible."
],
"example_title": "Ejemplo: home + VPS",
"example_lines": [
"HUB: vpn.example.com:51950",
"Casa publica: 192.168.1.0/24",
"VPS publica: 10.20.0.0/24",
"Tras vincularlos ambos lados enrutan por wgnode0"
],
"warning": ""
},
{
"title": "VPS Relay: sin IP pública en casa",
"paragraphs": [
"VPS Relay ayuda cuando los clientes no pueden llegar directamente al servidor, por ejemplo detrás de CGNAT. Un VPS público actúa como entrada, mientras el servidor WireGuard y sus reglas permanecen en el host WGTools."
],
"bullets": [
"Añade el VPS por SSH: WGTools comprueba el host y los puertos e instala Relay Agent.",
"Un mismo agente puede servir a varios controladores WGTools independientes con claves y conexiones aisladas.",
"Los clientes compatibles pueden elegir conexión directa o Relay. Quitar un VPS de WGTools desconecta el transporte local, pero deja el agente y el tenant guardados para reconectarlos después.",
"Relay proporciona una entrada pública a los clientes; Nodes enlaza servidores WGTools y sus redes. Son funciones diferentes."
],
"example_title": "Ejemplo",
"example_lines": [
"Teléfono → VPS público → transporte Relay protegido → WGTools doméstico → red necesaria"
],
"warning": ""
},
{
"title": "Diagnóstico",
"paragraphs": [
"El diagnóstico comprueba WireGuard, reenvío de IP, puertos, rutas y servicios. Es útil cuando un cliente no conecta o no alcanza una red remota."
],
"bullets": [
"Comprueba primero que la interfaz está funcionando y que existe un handshake reciente. Si el handshake funciona, revisa rutas, cortafuegos y camino de retorno.",
"Servidor → Ruta muestra los saltos de traceroute, RTT medio y aumentos de latencia. Los saltos sin respuesta aparecen de forma neutral y no implican por sí solos una avería.",
"El mapa permite desplazarse y hacer zoom; al pulsar un salto aparecen IP, ubicación aproximada, ASN/proveedor y RTT.",
"Con el mapa activado, las IP públicas se geolocalizan mediante ipwho.is y los mapas se cargan desde OpenStreetMap; las IP privadas no se envían. Traceroute no mide el ancho de banda real en Mbit/s.",
"El diagnóstico por sí mismo no modifica la configuración."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Aplicar cambios de forma segura",
"paragraphs": [
"Los cambios del servidor, las rutas y el cortafuegos pueden reiniciar brevemente WireGuard."
],
"bullets": [
"WGTools crea primero una copia de la configuración.",
"Si la nueva configuración no arranca, intenta restaurar la anterior automáticamente.",
"Los clientes pueden desconectarse un momento y normalmente se reconectan solos."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Pestaña Configuración",
"paragraphs": [
"Es un editor directo de /etc/wireguard/<interface>.conf para opciones que no aparecen en los formularios normales."
],
"bullets": [
"Úsalo únicamente si conoces la sintaxis de WireGuard y los comandos PostUp/PostDown.",
"WGTools valida el archivo y crea una copia antes de aplicarlo.",
"Una configuración no estándar puede limitar la edición automática para proteger reglas manuales. Nunca compartas PrivateKey, PresharedKey ni otros secretos."
],
"example_title": "Ejemplo",
"example_lines": [
"[Interface]",
"Address = 10.0.0.1/24",
"ListenPuerto = 51820",
"",
"[Peer]",
"AllowedIPs = 10.0.0.2/32"
],
"warning": "Nunca compartas PrivateKey, PresharedKey ni otros secretos."
}
]
},
{
"id": "clients",
"title": "Clientes",
"intro": "Un cliente puede ser un teléfono, portátil, router o cualquier peer WireGuard. Aquí gestionas configuraciones, permisos, caducidades, horarios y conexiones Site-to-Site.",
"topics": [
{
"title": "Cliente normal",
"paragraphs": [
"Elige Cliente para teléfonos y equipos. WGTools asigna una dirección VPN libre y genera las claves."
],
"bullets": [
"El nombre es solo una etiqueta en WGTools.",
"Endpoint en el archivo generado es la dirección que el dispositivo utiliza para encontrar el servidor WireGuard.",
"DNS puede establecerse por cliente o heredarse de una plantilla de grupo."
],
"example_title": "Ejemplo",
"example_lines": [
"Nombre: Teléfono",
"Dirección VPN: 10.0.0.3/32",
"Endpoint: vpn.example.com:51820"
],
"warning": ""
},
{
"title": "Tráfico VPN y AllowedIPs",
"paragraphs": [
"AllowedIPs en la configuración del cliente define qué destinos envía el dispositivo por el túnel. No equivale a la política de acceso del servidor."
],
"bullets": [
"Todo el tráfico envía tanto Internet como redes remotas por VPN; también puedes elegir únicamente ciertas redes.",
"Excluir la red local conserva acceso directo a la impresora o al router mientras Internet va por la VPN.",
"El servidor puede bloquear un destino aunque aparezca en AllowedIPs."
],
"example_title": "Ejemplo",
"example_lines": [
"0.0.0.0/0 — todo el tráfico IPv4 por VPN",
"192.168.50.0/24 — solo una red remota"
],
"warning": ""
},
{
"title": "Grupos de clientes",
"paragraphs": [
"Un grupo permite definir una plantilla y reglas de acceso una sola vez para varios clientes."
],
"bullets": [
"Los grupos controlan acceso a Internet, LAN y excepciones de permitir/bloquear.",
"También pueden ofrecer rutas, DNS y Keepalive predeterminados para configuraciones nuevas.",
"Los cambios de reglas del servidor se aplican enseguida, pero el archivo instalado en el teléfono no cambia automáticamente. Aplica la plantilla y entrega un nuevo archivo o QR si debe modificarse el dispositivo."
],
"example_title": "Ejemplo",
"example_lines": [
"Grupo «Invitados»",
"Internet: permitido",
"LAN: bloqueada",
"Miembros: Teléfono-1, Tablat-1"
],
"warning": ""
},
{
"title": "Reglas por cliente",
"paragraphs": [
"Un cliente puede heredar las reglas del grupo o añadir excepciones propias."
],
"bullets": [
"Una excepción individual de permitir o bloquear tiene prioridad sobre la excepción correspondiente del grupo.",
"Por ejemplo, un empleado puede acceder a un servidor prohibido para el resto de su grupo."
],
"example_title": "Ejemplo",
"example_lines": [
"El grupo bloquea 192.168.1.0/24",
"El cliente permite además 192.168.1.50/32"
],
"warning": ""
},
{
"title": "Cliente Site-to-Site",
"paragraphs": [
"Utiliza Site-to-Site cuando un peer representa una red completa. Introduce las redes detrás de él como Redes remotas."
],
"bullets": [
"WGTools añade esas rutas al servidor automáticamente.",
"Más adelante puedes publicarlas mediante Nodes.",
"Un teléfono o portátil común no necesita Site-to-Site."
],
"example_title": "Ejemplo",
"example_lines": [
"Peer router: 10.0.0.20/32",
"Red remota: 192.168.50.0/24"
],
"warning": ""
},
{
"title": "Conexión directa y VPS Relay",
"paragraphs": [
"Con VPS Relay instalado en la interfaz, los clientes compatibles pueden conectarse directamente o mediante Relay."
],
"bullets": [
"La conexión directa es preferible cuando el puerto WireGuard es accesible desde Internet.",
"Relay ayuda detrás de CGNAT o si el UDP entrante no está disponible.",
"La dirección VPN y la política de acceso del cliente permanecen iguales."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "PSK, aislamiento y rotación de claves",
"paragraphs": [
"WireGuard ya utiliza claves pública/privada. Un PSK opcional añade otro secreto compartido."
],
"bullets": [
"El aislamiento impide que un cliente alcance otras direcciones de la misma red VPN.",
"Rotar las claves crea un par nuevo y, si está habilitado, otro PSK. El archivo anterior deja de funcionar; entrega uno nuevo o un QR.",
"Dirección VPN, grupo, horarios e historial de tráfico se conservan."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Acceso temporal",
"paragraphs": [
"Un cliente puede caducar después de 1, 3 o 6 horas, un día o en una fecha y hora personalizada."
],
"bullets": [
"Al cumplirse el plazo, un servicio en segundo plano ejecuta la acción de caducidad elegida.",
"Para reactivar un cliente caducado que sigue guardado, elige una nueva caducidad o Sin límite."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Horario de acceso",
"paragraphs": [
"Un horario habilita y bloquea automáticamente al cliente en días y horas seleccionados sin sustituir su configuración."
],
"bullets": [
"Utiliza la hora local del servidor WireGuard.",
"Los intervalos pueden cruzar la medianoche, por ejemplo 22:00–06:00.",
"Al comenzar un nuevo período permitido, WGTools recupera el mismo peer."
],
"example_title": "Ejemplo",
"example_lines": [
"Lun–Vie: 08:00–19:00"
],
"warning": ""
},
{
"title": "Estado, Endpoint y tráfico",
"paragraphs": [
"La tabla muestra el último handshake, Endpoint y totales RX/TX."
],
"bullets": [
"Un handshake reciente significa que el cliente se ha comunicado con el servidor hace poco.",
"El Endpoint de un móvil puede cambiar al pasar entre Wi-Fi y LTE; es normal.",
"La búsqueda rápida filtra por nombre, dirección, grupo y estado."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Configuración y código QR",
"paragraphs": [
"Un archivo .conf resulta práctico para ordenadores y routers; el QR para la aplicación móvil WireGuard."
],
"bullets": [
"PrivateKey del cliente se incluye tanto en el archivo como en el QR: protégelos como una contraseña.",
"Al volver a emitir la configuración de un cliente gestionado se utilizan las claves almacenadas en WGTools.",
"Después de rotar claves entrega siempre una nueva configuración."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Editar y eliminar",
"paragraphs": [
"WGTools guarda una copia de la configuración WireGuard antes de los cambios gestionados y los aplica de manera segura."
],
"bullets": [
"Eliminar un cliente gestionado quita su peer, claves guardadas y reglas relacionadas.",
"Un archivo que ya esté en el dispositivo no se borra a distancia, pero ya no podrá conectarse."
],
"example_title": "",
"example_lines": [],
"warning": ""
}
]
},
{
"id": "settings",
"title": "Ajustes",
"intro": "Aquí encontrarás apariencia, copias de seguridad, Telegram, correo, HTTPS, usuarios, auditoría y actualizaciones.",
"topics": [
{
"title": "Apariencia e idioma",
"paragraphs": [
"Selecciona tema claro, oscuro o del sistema y el idioma de la interfaz."
],
"bullets": [
"Contraer la barra lateral deja visibles solo los iconos.",
"Su estado se guarda en el navegador y cambia de inmediato.",
"WGTools guarda el idioma elegido."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Actualización del estado",
"paragraphs": [
"El intervalo de actualización define cada cuánto se renuevan los estados del servidor y los clientes. El umbral online establece durante cuánto tiempo después del handshake se considera conectado un peer."
],
"bullets": [],
"example_title": "Ejemplo",
"example_lines": [
"Actualización: 5 s",
"En línea: 180 s"
],
"warning": ""
},
{
"title": "Copias automáticas de configuración",
"paragraphs": [
"WGTools guarda un historial de configuraciones WireGuard antes de cambios delicados para poder revertirlos rápidamente."
],
"bullets": [
"Puedes elegir cuántas copias mantener.",
"Este historial es distinto de la copia completa y portátil de WGTools."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Copia completa y restauración",
"paragraphs": [
"Un archivo .wgtbackup permite migrar a otro servidor o recuperar datos tras una avería."
],
"bullets": [
"Contiene configuraciones WireGuard, base de usuarios y ajustes, grupos, datos de clientes, configuración Telegram/SMTP y estado necesario para restaurar VPS Relay/Nodes.",
"Antes de restaurar, WGTools valida el archivo y guarda una copia de seguridad del estado actual. Si falla, intenta revertir los cambios.",
"Tras restaurar correctamente se cierra la sesión web actual; entra con una cuenta de la base restaurada."
],
"example_title": "",
"example_lines": [],
"warning": ".wgtbackup contiene claves privadas, PSK, hashes de contraseñas, token de Telegram y contraseña SMTP. Guárdalo como si fuera una contraseña."
},
{
"title": "Bot de Telegram",
"paragraphs": [
"Telegram permite consultar y administrar WireGuard sin abrir la interfaz web."
],
"bullets": [
"Crea un bot con @BotFather, pega su token, actívalo y envía /start.",
"Si tu ID de Telegram aún no está autorizado, el bot muestra el número: añádelo a la lista permitida.",
"Los comandos de administración solo funcionan en chats privados: estado, clientes, creación/eliminación, nueva emisión de configuraciones/QR y controles WireGuard."
],
"example_title": "Ejemplo",
"example_lines": [
"Endpoint predeterminado: vpn.example.com",
"DNS: 1.1.1.1, 8.8.8.8"
],
"warning": ""
},
{
"title": "Correo SMTP y recuperación de contraseña",
"paragraphs": [
"SMTP hace posible «¿Olvidaste tu contraseña?» en la pantalla de acceso."
],
"bullets": [
"Admite STARTTLS, TLS/SSL y SMTP sin cifrar en una LAN de confianza. El usuario puede quedar vacío si el servidor SMTP no exige autenticación.",
"La contraseña se almacena localmente y nunca se devuelve al navegador. El botón de prueba envía un mensaje al destinatario indicado.",
"Los códigos de recuperación son de un solo uso, se almacenan como hashes, duran 15 minutos y tienen límite de intentos."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "HTTPS integrado",
"paragraphs": [
"WGTools puede servir HTTPS directamente, sin Nginx, Caddy ni otro proxy inverso."
],
"bullets": [
"Introduce dominio/IP pública, correo, puerto HTTPS y ruta privada; después pulsa Obtener / renovar certificado. La acción también guarda estos ajustes HTTPS.",
"HTTPS solo puede activarse si ya existe un certificado adecuado. Tras emitirlo, activa la opción y pulsa Guardar; un dominio/IP diferente necesita su propio certificado.",
"El puerto TCP 80 debe ser accesible desde Internet para emitir y renovar. El panel usa el puerto HTTPS elegido, como 443 u 8443. La ruta privada define la URL, por ejemplo /MyWGTools/; otras rutas devuelven 404 con HTTPS integrado.",
"WGTools informa de puertos locales ocupados y nunca detiene servidores web ajenos; un temporizador systemd renueva el certificado automáticamente.",
"La ruta privada no sustituye a la autenticación. Evita exponer el panel innecesariamente y utiliza credenciales robustas."
],
"example_title": "Ejemplo",
"example_lines": [
"https://wg.example.com/MyWGTools/"
],
"warning": "Una ruta privada no sustituye la autenticación. Evita exponer el panel sin necesidad y usa credenciales seguras."
},
{
"title": "Usuarios",
"paragraphs": [
"La primera cuenta se crea durante la instalación de WGTools. Puedes añadir otras desde Ajustes."
],
"bullets": [
"Por ahora todos los usuarios tienen los mismos permisos. Se pueden cambiar correo y contraseña y eliminar cuentas.",
"Cada usuario puede activar MFA con Google Authenticator u otra aplicación TOTP y recibir una vez códigos de recuperación.",
"Si pierde el autenticador, root puede desactivar MFA con el comando wgtools. No se puede eliminar al usuario actual ni al último usuario existente.",
"Cambiar o recuperar la contraseña y activar/desactivar MFA invalidan las sesiones web anteriores de esa cuenta."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Registro de auditoría",
"paragraphs": [
"Auditoría muestra acciones importantes de administración web/Telegram e historial útil de conexiones WireGuard."
],
"bullets": [
"Las acciones web registran el usuario WGTools; las de Telegram incluyen @username, si existe, y su ID numérico.",
"Se anotan cambios de configuración, acceso a archivos/QR, actualizaciones y fallos relevantes.",
"No se registran contraseñas, claves privadas, PSK, tokens ni configuraciones completas. El historial tiene retención limitada y se limpia automáticamente."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Actualizaciones WGTools",
"paragraphs": [
"WGTools comprueba periódicamente las versiones estables de GitHub, pero no instala nada sin confirmación explícita."
],
"bullets": [
"Cuando existe una versión nueva aparece un aviso.",
"Antes de actualizar crea un .wgtbackup completo y otro archivo para restaurar la versión previa de la aplicación.",
"Si la versión nueva no inicia, WGTools intenta recuperar la anterior. La versión actual figura en el panel y en Acerca de."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Comando wgtools y acceso de emergencia",
"paragraphs": [
"El comando root wgtools es útil si el panel web deja de estar disponible."
],
"bullets": [
"Muestra el estado de WGTools, WireGuard, Nodes, Telegram, temporizadores y Relay Agent local, además de la URL del panel.",
"Puede iniciar, detener y reiniciar panel o WireGuard y mostrar registros. Si el puerto HTTPS o la ruta privada se configuran mal, permite desactivar HTTPS integrado y recuperar HTTP.",
"También permite a root desactivar MFA cuando se pierden el autenticador y los códigos.",
"Desinstalar WGTools elimina panel y servicios, pero conserva WireGuard normal y datos reutilizables. FULL CLEANUP, tras confirmar DELETE ALL, elimina WGTools, Relay local y WireGuard de este host; no toca los agentes Relay de otros VPS."
],
"example_title": "Ejemplo",
"example_lines": [
"root@server:~# wgtools"
],
"warning": ""
},
{
"title": "Dónde se guardan los datos",
"paragraphs": [
"Normalmente no hace falta editar estos archivos manualmente, pero sus rutas ayudan a solucionar problemas y planificar copias de seguridad."
],
"bullets": [],
"example_title": "Rutas principales",
"example_lines": [
"/etc/wireguard/wg0.conf — configuración WireGuard",
"/var/lib/wgtools/wgtools.db — usuarios y ajustes",
"/var/lib/wgtools/clients/ — datos de clientes gestionados",
"/var/lib/wgtools/backups/ — historial de configuración",
"/var/lib/wgtools/update-backups/ — archivos de reversión de actualización"
],
"warning": ""
}
]
}
]
-663
View File
@@ -1,663 +0,0 @@
[
{
"id": "dashboard",
"title": "Tableau de bord",
"intro": "Le tableau de bord permet de vérifier rapidement si WireGuard fonctionne, quels clients sont connectés et si le serveur est en bonne santé.",
"topics": [
{
"title": "Par où commencer",
"paragraphs": [
"La barre supérieure indique l'interface WireGuard sélectionnée. Si plusieurs interfaces existent, les pages WGTools utilisent celle qui est sélectionnée."
],
"bullets": [
"Démarrer active WireGuard, Arrêter le désactive et Redémarrer relance brièvement l'interface.",
"Les téléphones et ordinateurs se reconnectent normalement tout seuls après un redémarrage.",
"Quand l'interface est arrêtée, ses clients ne peuvent plus se connecter."
],
"example_title": "Exemple",
"example_lines": [
"wg0 · Home · 10.0.0.1/24 · UDP 51820"
],
"warning": ""
},
{
"title": "Processeur, mémoire, réseau et disponibilité",
"paragraphs": [
"Ces indicateurs concernent l'ensemble du serveur Debian, et pas seulement WireGuard."
],
"bullets": [
"CPU montre la charge actuelle du processeur et Mémoire la RAM utilisée et totale.",
"Réseau affiche les débits actuels de réception et d'émission de l'interface externe.",
"La durée de fonctionnement est mesurée depuis le dernier démarrage. Les graphiques sur 24 heures révèlent les charges anormales et les flux persistants."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Qui est connecté ?",
"paragraphs": [
"WireGuard ne conserve pas de session comme un site web. WGTools considère un client en ligne si son dernier handshake est suffisamment récent."
],
"bullets": [
"Handshake désigne le dernier échange de contrôle WireGuard réussi ; Endpoint est l'adresse IP publique et le port utilisés par le client.",
"« Jamais » signifie que le serveur n'a encore reçu aucun handshake réussi de ce pair.",
"La recherche rapide filtre par nom, adresse VPN, type et Endpoint."
],
"example_title": "Exemple",
"example_lines": [
"Téléphone · 10.0.0.3/32",
"Endpoint: 203.0.113.25:63275",
"Handshake: il y a 18 s"
],
"warning": ""
},
{
"title": "Trafic",
"paragraphs": [
"WGTools conserve les totaux RX/TX séparément des compteurs temporaires de WireGuard. Les statistiques survivent donc au redémarrage de l'interface ou du serveur."
],
"bullets": [
"La carte Trafic affiche le volume cumulé de l'interface choisie ; chaque client possède ses propres totaux RX/TX.",
"Réinitialiser recommence le comptage à partir de maintenant.",
"RX/TX dans la carte Réseau correspond au débit instantané, pas au volume total."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Plusieurs interfaces WireGuard",
"paragraphs": [
"Un même serveur peut héberger plusieurs VPN indépendants, par exemple personnel et professionnel."
],
"bullets": [
"Changer l'interface en haut ne modifie aucune configuration : cela sélectionne seulement les données affichées sur Tableau de bord, Serveur et Clients.",
"Chaque interface a ses adresses, son port, ses clients, ses routes et ses règles d'accès."
],
"example_title": "Exemple",
"example_lines": [
"wg0 · Home · 10.0.0.1/24",
"wg1 · Travail · 10.0.1.1/24"
],
"warning": ""
}
]
},
{
"id": "server",
"title": "Serveur",
"intro": "Cette section gère WireGuard : interfaces, routage, accès réseau, liaison entre serveurs via Nodes et accès public via VPS Relay.",
"topics": [
{
"title": "Réseaux VPN et interfaces WireGuard",
"paragraphs": [
"Une interface WireGuard ressemble à une carte réseau virtuelle possédant son propre sous-réseau VPN. Chaque client reçoit une adresse de ce sous-réseau."
],
"bullets": [
"Les noms système sont généralement wg0, wg1, etc. Un nom affiché comme Home ou Office facilite simplement la lecture.",
"ListenPort est le port UDP auquel les clients se connectent.",
"Le MTU peut généralement rester sur Auto ; ne le modifier qu'en cas de problème spécifique avec un réseau, LTE ou PPPoE."
],
"example_title": "Exemple",
"example_lines": [
"Réseau VPN: 10.0.0.0/24",
"Adresse du serveur: 10.0.0.1/24",
"Clients: 10.0.0.2, 10.0.0.3, ...",
"Port: UDP 51820"
],
"warning": ""
},
{
"title": "Installation initiale et interfaces supplémentaires",
"paragraphs": [
"Sur un Debian neuf, WGTools peut installer WireGuard et créer la première interface avec un assistant. Vous pouvez ensuite ajouter wg1, wg2, etc."
],
"bullets": [
"WGTools suggère un sous-réseau VPN libre, un port UDP et une table de routage par règles.",
"Les chevauchements de réseaux et les ports occupés sont vérifiés avant création.",
"Chaque interface reçoit ses propres clés et sa configuration. Sa suppression crée d'abord une sauvegarde, puis retire les données gérées associées."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Comprendre le NAT",
"paragraphs": [
"NAT/MASQUERADE permet à un client VPN d'atteindre le LAN ou Internet en utilisant l'adresse du serveur WireGuard comme source visible. C'est souvent la solution la plus simple à domicile."
],
"bullets": [
"Avec NAT activé, le routeur domestique n'a généralement pas besoin d'une route retour vers le sous-réseau VPN.",
"Sans NAT, les routeurs voisins doivent disposer des routes de retour appropriées."
],
"example_title": "Exemple",
"example_lines": [
"Téléphone 10.0.0.3 → WGTools 192.168.1.10 → Internet",
"Le routeur domestique voit la source 192.168.1.10"
],
"warning": ""
},
{
"title": "Routes et routage par règles",
"paragraphs": [
"Une route indique à Linux l'interface ou la passerelle vers un réseau. Le routage par règles permet de choisir une autre table, par exemple pour les clients VPN."
],
"bullets": [
"Une installation domestique simple n'a souvent pas besoin d'une table distincte.",
"Celle-ci est utile pour imposer une passerelle, un autre VPN ou une liaison WAN dédiée.",
"WGTools distingue les routes système, Site-to-Site et manuelles. Les routes personnalisées se créent, modifient et suppriment depuis l'interface."
],
"example_title": "Exemple",
"example_lines": [
"Source: 10.0.0.0/24",
"Table: 200",
"Default via: 192.168.1.1 dev eth0"
],
"warning": ""
},
{
"title": "Pare-feu et accès réseau",
"paragraphs": [
"Le pare-feu décide si le trafic est autorisé ; le routage décide seulement de sa destination. Ce sont deux fonctions distinctes."
],
"bullets": [
"Vous pouvez autoriser ou bloquer l'accès d'un client VPN à un réseau donné.",
"WGTools génère automatiquement les règles de groupe et les exceptions par client.",
"Avant d'appliquer des changements, il sauvegarde la configuration et revient en arrière si WireGuard ne démarre plus."
],
"example_title": "Exemple",
"example_lines": [
"10.0.0.6/32 → bloquer → 192.168.1.0/24",
"Les autres clients peuvent toujours accéder au LAN"
],
"warning": ""
},
{
"title": "Site-to-Site : relier deux réseaux",
"paragraphs": [
"Site-to-Site sert lorsqu'un pair représente un réseau distant entier, et non un simple téléphone ou ordinateur."
],
"bullets": [
"Indiquez les réseaux derrière ce pair dans Réseaux distants : WGTools crée automatiquement les routes.",
"La déconnexion du pair ne supprime pas ces routes configurées.",
"Le réseau distant doit également posséder une route de retour par WireGuard."
],
"example_title": "Exemple",
"example_lines": [
"Home: 192.168.1.0/24",
"Pair du bureau: 10.0.0.20/32",
"LAN du bureau: 192.168.50.0/24",
"Résultat : les appareils du domicile atteignent 192.168.50.x"
],
"warning": ""
},
{
"title": "Nodes : relier plusieurs serveurs WGTools",
"paragraphs": [
"Nodes connecte plusieurs installations WGTools grâce à un tunnel WireGuard interne dédié. L'une devient HUB et les autres la rejoignent avec un code à usage unique."
],
"bullets": [
"Le HUB utilise le même numéro de port en UDP pour WireGuard et TCP pour l'association initiale protégée. Ensuite, la synchronisation passe par wgnode0, indépendamment de l'URL du panneau, du port HTTPS et du chemin privé.",
"WGTools détecte les réseaux VPN, Site-to-Site et LAN. Ne publiez que les réseaux nécessaires ; un nouveau réseau détecté n'est jamais publié sans action explicite. Une modification ultérieure entraîne un avertissement de vérification.",
"Les réseaux publiés par plusieurs Nodes ne doivent pas se chevaucher (par exemple 10.0.0.0/24 sur deux sites). WGTools bloque les conflits.",
"Les détails des réseaux et clients distants sont en lecture seule. Publier un réseau le rend accessible aux nœuds associés : limitez cette exposition."
],
"example_title": "Exemple: home + VPS",
"example_lines": [
"HUB: vpn.example.com:51950",
"Domicile publie: 192.168.1.0/24",
"VPS publie: 10.20.0.0/24",
"Après association, les deux côtés passent par wgnode0"
],
"warning": ""
},
{
"title": "VPS Relay : sans IP publique à domicile",
"paragraphs": [
"VPS Relay aide lorsque le serveur n'est pas accessible directement depuis Internet, notamment derrière CGNAT. Un VPS public sert de point d'entrée ; le serveur WireGuard et ses règles restent sur l'hôte WGTools."
],
"bullets": [
"Ajoutez le VPS par SSH : WGTools vérifie l'hôte et les ports, puis installe Relay Agent.",
"Un même agent peut servir plusieurs contrôleurs WGTools indépendants avec clés et connexions isolées.",
"Les clients compatibles choisissent la connexion directe ou Relay. Supprimer un VPS dans WGTools détache le transport local mais conserve l'agent et le locataire enregistré pour une reconnexion.",
"Relay offre un point d'accès public aux clients, tandis que Nodes relie des serveurs WGTools et leurs réseaux."
],
"example_title": "Exemple",
"example_lines": [
"Téléphone → VPS public → transport Relay protégé → WGTools à domicile → réseau souhaité"
],
"warning": ""
},
{
"title": "Diagnostics",
"paragraphs": [
"Les diagnostics contrôlent WireGuard, le transfert IP, les ports, les routes et les services. Ils aident lorsqu'un client ne se connecte pas ou qu'un réseau est inaccessible."
],
"bullets": [
"Vérifiez d'abord que l'interface fonctionne et qu'un handshake récent existe. Si celui-ci réussit, cherchez du côté des routes, du pare-feu ou du chemin retour.",
"Serveur → Itinéraire montre les sauts traceroute, le RTT moyen et les hausses de latence. Les sauts sans réponse sont affichés de façon neutre : ils ne prouvent pas une panne.",
"La carte permet de déplacer et zoomer la vue ; cliquer un saut affiche son IP, sa position approximative, son ASN/fournisseur et son RTT.",
"Lorsque la carte est activée, les IP publiques sont géolocalisées via ipwho.is et les tuiles viennent d'OpenStreetMap ; les adresses privées ne sont pas envoyées. Traceroute ne mesure pas le débit en Mbit/s.",
"Les diagnostics ne modifient pas la configuration."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Appliquer les changements en sécurité",
"paragraphs": [
"Les changements au serveur, aux routes ou au pare-feu peuvent provoquer un bref redémarrage de WireGuard."
],
"bullets": [
"WGTools sauvegarde d'abord la configuration.",
"Si la nouvelle configuration échoue, WGTools tente de rétablir automatiquement l'ancienne.",
"Les clients peuvent se déconnecter quelques instants avant de se reconnecter seuls."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Onglet Configuration",
"paragraphs": [
"Cet éditeur donne accès directement à /etc/wireguard/<interface>.conf pour les options absentes des formulaires habituels."
],
"bullets": [
"Utilisez-le uniquement si vous maîtrisez la syntaxe WireGuard et les commandes PostUp/PostDown.",
"WGTools valide et sauvegarde le fichier avant application.",
"Une configuration non standard peut limiter l'édition automatique pour préserver les règles manuelles. Ne partagez jamais PrivateKey, PresharedKey ni aucun secret."
],
"example_title": "Exemple",
"example_lines": [
"[Interface]",
"Address = 10.0.0.1/24",
"ListenPort = 51820",
"",
"[Peer]",
"AllowedIPs = 10.0.0.2/32"
],
"warning": "Ne partagez jamais PrivateKey, PresharedKey ni aucun autre secret."
}
]
},
{
"id": "clients",
"title": "Clients",
"intro": "Un client peut être un téléphone, un ordinateur, un routeur ou tout autre pair WireGuard. Cette page gère configurations, règles d'accès, expirations, horaires et liens Site-to-Site.",
"topics": [
{
"title": "Client classique",
"paragraphs": [
"Choisissez Client pour un téléphone ou un ordinateur. WGTools attribue une adresse VPN libre et génère les clés."
],
"bullets": [
"Le nom est seulement une étiquette dans WGTools.",
"L'Endpoint du fichier généré indique où l'appareil doit joindre le serveur WireGuard.",
"Le DNS peut être défini par client ou hérité d'un modèle de groupe."
],
"example_title": "Exemple",
"example_lines": [
"Nom: Téléphone",
"Adresse VPN: 10.0.0.3/32",
"Endpoint: vpn.example.com:51820"
],
"warning": ""
},
{
"title": "Trafic VPN et AllowedIPs",
"paragraphs": [
"Dans la configuration client, AllowedIPs détermine le trafic envoyé dans le tunnel. C'est différent des règles d'accès côté serveur."
],
"bullets": [
"Tout le trafic fait passer Internet et les réseaux distants par le VPN ; vous pouvez aussi choisir certains réseaux seulement.",
"Le mode d'exclusion du réseau local préserve l'accès direct à une imprimante ou un routeur lorsque Internet passe par le VPN.",
"Une règle serveur peut bloquer une destination même présente dans AllowedIPs."
],
"example_title": "Exemple",
"example_lines": [
"0.0.0.0/0 — tout le trafic IPv4 par le VPN",
"192.168.50.0/24 — un seul réseau distant"
],
"warning": ""
},
{
"title": "Groupes de clients",
"paragraphs": [
"Un groupe permet de réutiliser les mêmes règles et modèles de configuration pour plusieurs clients."
],
"bullets": [
"Les groupes définissent l'accès Internet/LAN et les exceptions autorisées ou bloquées.",
"Ils peuvent fournir des routes, DNS et Keepalive par défaut aux nouvelles configurations.",
"Les règles côté serveur changent immédiatement, mais le fichier déjà installé sur le téléphone ne se modifie pas seul. Appliquez le modèle et remettez un fichier ou QR si nécessaire."
],
"example_title": "Exemple",
"example_lines": [
"Groupe « Invités »",
"Internet : autorisé",
"LAN : bloqué",
"Membres: Téléphone-1, Tablet-1"
],
"warning": ""
},
{
"title": "Règles individuelles",
"paragraphs": [
"Un client peut hériter des règles du groupe ou définir ses propres exceptions."
],
"bullets": [
"Une exception autorisant ou bloquant un client prime sur l'exception correspondante du groupe.",
"Cela permet, par exemple, de donner à un salarié l'accès à un serveur bloqué pour son groupe."
],
"example_title": "Exemple",
"example_lines": [
"Le groupe bloque 192.168.1.0/24",
"Le client autorise en plus 192.168.1.50/32"
],
"warning": ""
},
{
"title": "Client Site-to-Site",
"paragraphs": [
"Utilisez Site-to-Site lorsqu'un pair représente un réseau entier. Saisissez les réseaux derrière ce pair dans Réseaux distants."
],
"bullets": [
"WGTools ajoute automatiquement les routes correspondantes au serveur.",
"Ces réseaux peuvent ensuite être publiés via Nodes.",
"Un téléphone ou ordinateur normal n'a pas besoin du mode Site-to-Site."
],
"example_title": "Exemple",
"example_lines": [
"Pair routeur: 10.0.0.20/32",
"Réseau distant: 192.168.50.0/24"
],
"warning": ""
},
{
"title": "Connexion directe et VPS Relay",
"paragraphs": [
"Lorsque VPS Relay est installé pour l'interface, les clients compatibles peuvent se connecter directement ou via Relay."
],
"bullets": [
"Le mode direct est préférable si le port WireGuard est accessible depuis Internet.",
"Relay est utile derrière CGNAT ou si l'UDP entrant est impossible.",
"Adresse VPN et règles d'accès du client restent inchangées."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "PSK, isolation et renouvellement des clés",
"paragraphs": [
"WireGuard utilise déjà une paire clé publique/privée. Un PSK facultatif ajoute un secret partagé."
],
"bullets": [
"L'isolation empêche ce client de parler aux autres adresses du même réseau VPN.",
"Le renouvellement génère une nouvelle paire de clés et, si activé, un nouveau PSK. L'ancien fichier cesse de fonctionner : fournissez un nouveau fichier ou QR.",
"L'adresse VPN, le groupe, les horaires et l'historique du trafic sont conservés."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Accès temporaire",
"paragraphs": [
"L'accès peut expirer après 1, 3 ou 6 heures, un jour ou à une date/heure personnalisée."
],
"bullets": [
"À l'échéance, un service en arrière-plan applique l'action d'expiration choisie.",
"Pour réactiver un client expiré conservé, choisissez une nouvelle date ou Sans limite."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Horaires d'accès",
"paragraphs": [
"Un calendrier autorise ou bloque automatiquement un client certains jours et heures sans modifier son fichier de configuration."
],
"bullets": [
"Il utilise l'heure locale du serveur WireGuard.",
"Une plage peut traverser minuit, par exemple 22:00–06:00.",
"Au retour d'une plage autorisée, WGTools réactive le même pair."
],
"example_title": "Exemple",
"example_lines": [
"Lun–Ven: 08:00–19:00"
],
"warning": ""
},
{
"title": "État, Endpoint et trafic",
"paragraphs": [
"Le tableau affiche le dernier handshake, l'Endpoint et les totaux RX/TX."
],
"bullets": [
"Un handshake récent indique que le client a communiqué avec le serveur récemment.",
"L'Endpoint d'un téléphone peut changer entre Wi-Fi et LTE ; c'est normal.",
"La recherche rapide filtre par nom, adresse, groupe et état."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Configuration et QR",
"paragraphs": [
"Un fichier .conf convient aux ordinateurs et routeurs ; un QR à l'application mobile WireGuard."
],
"bullets": [
"La PrivateKey du client figure dans le fichier et le QR : protégez-les comme un mot de passe.",
"Réexporter la configuration d'un client géré réutilise les clés enregistrées dans WGTools.",
"Après renouvellement des clés, fournissez toujours une nouvelle configuration."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Modifier et supprimer",
"paragraphs": [
"WGTools sauvegarde la configuration WireGuard avant les changements gérés et les applique de façon sécurisée."
],
"bullets": [
"Supprimer un client géré retire son pair, ses clés enregistrées et les règles associées.",
"Un fichier conservé sur l'appareil n'est pas effacé à distance, mais il ne permet plus de se connecter."
],
"example_title": "",
"example_lines": [],
"warning": ""
}
]
},
{
"id": "settings",
"title": "Paramètres",
"intro": "Vous trouverez ici l'apparence, les sauvegardes, Telegram, l'e-mail, HTTPS, les utilisateurs, l'audit et les mises à jour.",
"topics": [
{
"title": "Apparence et langue",
"paragraphs": [
"Choisissez un thème clair, sombre ou système et la langue de l'interface."
],
"bullets": [
"Réduire la barre latérale n'affiche que les icônes.",
"Son état est conservé dans le navigateur et appliqué immédiatement.",
"La langue est enregistrée par WGTools."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Actualisation de l'état",
"paragraphs": [
"L'intervalle d'actualisation définit la fréquence de rafraîchissement des états serveur/client. Le seuil En ligne définit combien de temps après un handshake un pair est considéré connecté."
],
"bullets": [],
"example_title": "Exemple",
"example_lines": [
"Actualisation: 5 s",
"En ligne: 180 s"
],
"warning": ""
},
{
"title": "Sauvegardes automatiques de configuration",
"paragraphs": [
"WGTools conserve un historique des configurations WireGuard avant les opérations risquées afin de revenir rapidement sur un changement."
],
"bullets": [
"Vous pouvez définir le nombre de copies conservées.",
"Cet historique diffère de la sauvegarde portable complète de WGTools."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Sauvegarde complète et restauration",
"paragraphs": [
"Un fichier .wgtbackup sert aux migrations et à la reprise après incident."
],
"bullets": [
"Il inclut configurations WireGuard, base des utilisateurs et paramètres, groupes, données des clients, paramètres Telegram/SMTP et état nécessaire pour restaurer VPS Relay/Nodes.",
"Avant restauration, WGTools vérifie l'archive et sauvegarde l'état actuel. En cas d'échec, il tente un retour arrière automatique.",
"Après une restauration réussie, la session web actuelle est terminée : reconnectez-vous avec un compte de la base restaurée."
],
"example_title": "",
"example_lines": [],
"warning": ".wgtbackup contient clés privées, PSK, empreintes des mots de passe, jeton Telegram et mot de passe SMTP. Conservez-le comme un mot de passe."
},
{
"title": "Bot Telegram",
"paragraphs": [
"Telegram permet de consulter et gérer WireGuard sans ouvrir le panneau web."
],
"bullets": [
"Créez un bot avec @BotFather, collez son jeton, activez-le et envoyez /start.",
"Si votre identifiant Telegram n'est pas autorisé, le bot indique son numéro : ajoutez-le à la liste autorisée.",
"Les commandes d'administration fonctionnent uniquement dans les discussions privées : état, clients, création/suppression, réédition des configurations/QR et commandes WireGuard."
],
"example_title": "Exemple",
"example_lines": [
"Endpoint par défaut: vpn.example.com",
"DNS: 1.1.1.1, 8.8.8.8"
],
"warning": ""
},
{
"title": "E-mail / SMTP et récupération du mot de passe",
"paragraphs": [
"SMTP permet la fonction « Mot de passe oublié ? » sur la page de connexion."
],
"bullets": [
"STARTTLS, TLS/SSL et SMTP simple sur un réseau local de confiance sont pris en charge. Le nom d'utilisateur peut rester vide si le serveur n'exige pas d'authentification.",
"Le mot de passe reste local et n'est jamais renvoyé au navigateur. Le bouton Test envoie un e-mail au destinataire choisi.",
"Les codes de récupération sont à usage unique, stockés sous forme de hachage, valables 15 minutes et limités en tentatives."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "HTTPS intégré",
"paragraphs": [
"WGTools peut servir HTTPS directement, sans Nginx, Caddy ou proxy inverse externe."
],
"bullets": [
"Saisissez domaine/IP publique, e-mail, port HTTPS et chemin privé, puis Obtenir / renouveler le certificat. Cette action enregistre également les paramètres HTTPS.",
"HTTPS ne peut être activé qu'avec un certificat approprié. Après émission, activez-le et Enregistrer ; toute nouvelle adresse nécessite son certificat.",
"Le port TCP 80 doit être accessible depuis Internet pour la délivrance et le renouvellement. Le panneau utilise le port HTTPS choisi (443 ou 8443, par exemple). Un chemin comme /MyWGTools/ définit son URL ; les autres chemins renvoient 404 lorsque HTTPS intégré est activé.",
"WGTools affiche les ports occupés et n'arrête pas les serveurs web tiers ; un timer systemd renouvelle le certificat automatiquement.",
"Le chemin privé ne remplace pas l'authentification : évitez d'exposer le panneau et utilisez des identifiants robustes."
],
"example_title": "Exemple",
"example_lines": [
"https://wg.example.com/MyWGTools/"
],
"warning": "Un chemin privé ne remplace pas l’authentification. N'exposez pas inutilement le panneau et utilisez des identifiants robustes."
},
{
"title": "Utilisateurs",
"paragraphs": [
"Le premier compte est créé lors de l'installation ; d'autres peuvent être ajoutés dans Paramètres."
],
"bullets": [
"Tous les utilisateurs disposent actuellement des mêmes droits ; e-mail et mot de passe peuvent être modifiés et des comptes supprimés.",
"Chacun peut activer MFA avec Google Authenticator ou une application TOTP et recevoir une fois des codes de récupération.",
"En cas de perte du téléphone, root peut désactiver MFA pour un utilisateur avec la commande wgtools. Le compte courant et le dernier compte restant ne peuvent être supprimés.",
"Un changement ou une récupération de mot de passe, ainsi que l'activation/désactivation MFA, invalident les anciennes sessions web."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Journal d'audit",
"paragraphs": [
"L'audit répertorie les opérations d'administration web/Telegram importantes et l'historique utile des connexions WireGuard."
],
"bullets": [
"Les actions web indiquent le nom WGTools ; celles de Telegram contiennent @username si disponible et l'identifiant numérique.",
"Changements de configuration, consultation de fichiers/QR, mises à jour et erreurs utiles sont enregistrés.",
"Mots de passe, clés privées, PSK, jetons et contenu complet des configurations ne sont jamais inscrits au journal. Celui-ci est automatiquement purgé selon sa durée de conservation."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Mises à jour WGTools",
"paragraphs": [
"WGTools vérifie régulièrement les versions stables sur GitHub mais n'installe rien sans confirmation explicite."
],
"bullets": [
"Une nouvelle version entraîne l'affichage d'un avis.",
"Avant la mise à jour, WGTools crée une sauvegarde .wgtbackup complète et une archive séparée pour revenir à l'ancienne version.",
"Si la nouvelle application ne démarre pas, il tente de restaurer l'ancienne. La version actuelle apparaît dans l'interface et dans À propos."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Commande wgtools et accès d'urgence",
"paragraphs": [
"La commande root wgtools est utile lorsque le panneau web n'est plus accessible."
],
"bullets": [
"Elle indique l'état de WGTools, WireGuard, Nodes, Telegram, des tâches et du Relay Agent local ainsi que l'URL du panneau.",
"Elle peut démarrer, arrêter, redémarrer le panneau ou WireGuard et consulter les journaux. En cas de port HTTPS ou chemin privé erroné, elle peut désactiver HTTPS intégré et rétablir HTTP.",
"Elle permet également à root de désactiver MFA pour un utilisateur ayant perdu l'authentificateur et les codes.",
"La désinstallation retire panneau et services sans supprimer WireGuard ni les données réutilisables. FULL CLEANUP, après confirmation DELETE ALL, efface WGTools, Relay local et WireGuard sur cet hôte seulement ; les agents des autres VPS ne sont pas touchés."
],
"example_title": "Exemple",
"example_lines": [
"root@server:~# wgtools"
],
"warning": ""
},
{
"title": "Emplacement des données",
"paragraphs": [
"La modification manuelle est rarement nécessaire, mais connaître ces chemins aide au dépannage et aux sauvegardes."
],
"bullets": [],
"example_title": "Chemins principaux",
"example_lines": [
"/etc/wireguard/wg0.conf — configuration WireGuard",
"/var/lib/wgtools/wgtools.db — utilisateurs et paramètres",
"/var/lib/wgtools/clients/ — données des clients gérés",
"/var/lib/wgtools/backups/ — historique de configuration",
"/var/lib/wgtools/update-backups/ — archives de retour arrière"
],
"warning": ""
}
]
}
]
-663
View File
@@ -1,663 +0,0 @@
[
{
"id": "dashboard",
"title": "Panoramica",
"intro": "La panoramica risponde a tre domande: WireGuard funziona, chi è connesso e il server è in buone condizioni?",
"topics": [
{
"title": "Da dove iniziare",
"paragraphs": [
"La barra superiore mostra l'interfaccia WireGuard selezionata. Se ce ne sono più di una, le pagine WGTools utilizzano quella attiva."
],
"bullets": [
"Avvia attiva WireGuard, Arresta lo ferma e Riavvia riavvia brevemente l'interfaccia.",
"Telefoni e computer normalmente si riconnettono da soli dopo un riavvio.",
"Quando l'interfaccia è ferma, i suoi client non possono collegarsi."
],
"example_title": "Esempio",
"example_lines": [
"wg0 · Home · 10.0.0.1/24 · UDP 51820"
],
"warning": ""
},
{
"title": "CPU, memoria, rete e tempo di attività",
"paragraphs": [
"Questi dati si riferiscono all'intero host Debian, non soltanto a WireGuard."
],
"bullets": [
"CPU indica il carico attuale del processore; Memoria mostra RAM utilizzata e totale.",
"Rete indica la velocità corrente di ricezione e trasmissione sull'interfaccia esterna.",
"Il tempo di attività decorre dall'ultimo avvio del sistema; i grafici delle ultime 24 ore aiutano a individuare carichi anomali e traffico persistente."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Chi è connesso",
"paragraphs": [
"WireGuard non mantiene una sessione come un sito web. WGTools considera un client online se l'ultimo handshake è abbastanza recente."
],
"bullets": [
"Handshake è l'ultimo scambio di controllo WireGuard riuscito; Endpoint è l'IP pubblico e la porta utilizzati dal client.",
"«Mai» significa che il server non ha ancora ricevuto un handshake valido da quel peer.",
"La ricerca rapida filtra per nome, indirizzo VPN, tipo ed Endpoint."
],
"example_title": "Esempio",
"example_lines": [
"Telefono · 10.0.0.3/32",
"Endpoint: 203.0.113.25:63275",
"Handshake: 18 s fa"
],
"warning": ""
},
{
"title": "Traffico",
"paragraphs": [
"WGTools conserva i totali RX/TX separatamente dai contatori temporanei di WireGuard; le statistiche rimangono anche dopo il riavvio dell'interfaccia o del server."
],
"bullets": [
"Il riquadro Traffico mostra il volume accumulato dell'interfaccia scelta; ogni client ha i propri totali RX/TX.",
"Reimposta ricomincia il conteggio dal momento corrente.",
"RX/TX nel riquadro Rete indica la velocità istantanea, non il volume accumulato."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Più interfacce WireGuard",
"paragraphs": [
"Un singolo server può gestire varie VPN indipendenti, per esempio casa e ufficio."
],
"bullets": [
"Cambiare la scelta nella barra superiore non modifica la configurazione: seleziona solo i dati visibili in Panoramica, Server e Client.",
"Ogni interfaccia possiede indirizzi, porta, client, percorsi e regole di accesso propri."
],
"example_title": "Esempio",
"example_lines": [
"wg0 · Home · 10.0.0.1/24",
"wg1 · Lavoro · 10.0.1.1/24"
],
"warning": ""
}
]
},
{
"id": "server",
"title": "Server",
"intro": "Questa sezione gestisce interfacce WireGuard, instradamento, accesso alle reti, collegamenti Nodes e accesso pubblico tramite VPS Relay.",
"topics": [
{
"title": "Reti VPN e interfacce WireGuard",
"paragraphs": [
"Un'interfaccia WireGuard si comporta come una scheda di rete virtuale con una propria sottorete VPN. Ogni client riceve un indirizzo di quella rete."
],
"bullets": [
"I nomi di sistema sono di solito wg0, wg1 e così via. Un nome descrittivo come Home o Office serve solo per comodità.",
"ListenPort è la porta UDP a cui si collegano i client.",
"Di norma MTU può restare su Auto; va modificato manualmente solo per problemi di rete particolari, LTE o PPPoE."
],
"example_title": "Esempio",
"example_lines": [
"Rete VPN: 10.0.0.0/24",
"Indirizzo server: 10.0.0.1/24",
"Client: 10.0.0.2, 10.0.0.3, ...",
"Porta: UDP 51820"
],
"warning": ""
},
{
"title": "Prima configurazione e altre interfacce",
"paragraphs": [
"Su un Debian pulito WGTools può installare WireGuard e creare la prima interfaccia tramite procedura guidata. In seguito puoi aggiungere wg1, wg2 ecc."
],
"bullets": [
"WGTools propone una sottorete VPN libera, una porta UDP e una tabella di policy routing.",
"Prima della creazione controlla le sovrapposizioni tra reti e le porte già occupate.",
"Ogni interfaccia ha chiavi e configurazione proprie; prima dell'eliminazione viene effettuato un backup e vengono rimossi i dati gestiti correlati."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "NAT spiegato semplicemente",
"paragraphs": [
"NAT/MASQUERADE consente a un client VPN di raggiungere LAN o Internet usando come sorgente l'indirizzo del server WireGuard. In casa è spesso la scelta più semplice."
],
"bullets": [
"Con NAT attivo, di solito il router domestico non ha bisogno di una rotta di ritorno specifica verso la VPN.",
"Senza NAT, il routing reale richiede rotte di ritorno sui router vicini."
],
"example_title": "Esempio",
"example_lines": [
"Telefono 10.0.0.3 → WGTools 192.168.1.10 → Internet",
"Il router di casa vede la sorgente 192.168.1.10"
],
"warning": ""
},
{
"title": "Rotte e policy routing",
"paragraphs": [
"Una rotta indica a Linux quale interfaccia o gateway conduce a una rete. Il policy routing permette di scegliere una tabella separata per un traffico specifico, ad esempio quello dei client VPN."
],
"bullets": [
"Una semplice installazione domestica spesso non richiede una tabella dedicata.",
"È utile se i client devono usare un gateway specifico, un'altra VPN o una WAN separata.",
"WGTools distingue rotte di sistema, Site-to-Site e manuali. Le rotte personalizzate si possono aggiungere, modificare ed eliminare."
],
"example_title": "Esempio",
"example_lines": [
"Sorgente: 10.0.0.0/24",
"Tabella: 200",
"Default via: 192.168.1.1 dev eth0"
],
"warning": ""
},
{
"title": "Firewall e accesso alla rete",
"paragraphs": [
"Il firewall stabilisce se un traffico è consentito; il routing determina soltanto dove inviarlo. Sono due aspetti diversi."
],
"bullets": [
"Puoi consentire o bloccare a un client VPN l'accesso a una determinata rete.",
"WGTools genera automaticamente le regole di gruppo e le eccezioni per singolo client.",
"Prima delle modifiche esegue un backup e ripristina la configurazione precedente se WireGuard non si avvia."
],
"example_title": "Esempio",
"example_lines": [
"10.0.0.6/32 → blocca → 192.168.1.0/24",
"Gli altri client possono ancora raggiungere la LAN"
],
"warning": ""
},
{
"title": "Site-to-Site: collegare due reti",
"paragraphs": [
"Site-to-Site serve quando un peer rappresenta un'intera rete remota anziché un singolo telefono o laptop."
],
"bullets": [
"Indica le reti dietro al peer nel campo Reti remote: WGTools crea automaticamente le rotte.",
"Il passaggio del peer a offline non elimina le rotte configurate.",
"Anche il lato remoto deve avere una rotta di ritorno tramite WireGuard."
],
"example_title": "Esempio",
"example_lines": [
"Home: 192.168.1.0/24",
"Peer ufficio: 10.0.0.20/32",
"LAN ufficio: 192.168.50.0/24",
"Risultato: i dispositivi di casa raggiungono 192.168.50.x"
],
"warning": ""
},
{
"title": "Nodes: collegare server WGTools",
"paragraphs": [
"Nodes collega più installazioni WGTools con un tunnel WireGuard interno dedicato. Un server diventa HUB e gli altri si associano con un codice monouso."
],
"bullets": [
"L'HUB usa lo stesso numero di porta in UDP per WireGuard e in TCP per l'associazione iniziale protetta. Poi la sincronizzazione passa dentro wgnode0, indipendentemente dall'URL del pannello, dalla porta HTTPS e dal percorso privato.",
"WGTools rileva reti VPN, Site-to-Site e LAN: pubblica solo quelle necessarie. Le reti individuate successivamente non vengono pubblicate automaticamente; vanno aggiunte esplicitamente. Le modifiche alle reti generano un avviso.",
"Le reti pubblicate su Nodes diversi non devono sovrapporsi (per esempio 10.0.0.0/24 in due siti). WGTools blocca i conflitti.",
"La vista Dettagli mostra reti e client remoti in sola lettura. Pubblicare una rete la rende raggiungibile dagli altri nodi: limita l'accesso al necessario."
],
"example_title": "Esempio: home + VPS",
"example_lines": [
"HUB: vpn.example.com:51950",
"Casa pubblica: 192.168.1.0/24",
"VPS pubblica: 10.20.0.0/24",
"Dopo l’associazione entrambi i lati passano da wgnode0"
],
"warning": ""
},
{
"title": "VPS Relay: casa senza IP pubblico",
"paragraphs": [
"VPS Relay aiuta dietro CGNAT o quando i client non riescono a raggiungere direttamente il server. Un VPS pubblico diventa punto di ingresso; server WireGuard e regole rimangono sull'host WGTools."
],
"bullets": [
"Aggiungi il VPS via SSH: WGTools verifica host e porte e poi installa Relay Agent.",
"Un agente può servire diversi controller WGTools indipendenti con connessioni e chiavi separate.",
"I client supportati possono collegarsi direttamente o tramite Relay. Rimuovere il VPS dal pannello scollega il trasporto locale ma conserva agente e tenant sul VPS per una futura riconnessione.",
"Relay offre un ingresso pubblico ai client; Nodes collega i server WGTools e le loro reti. Sono funzioni diverse."
],
"example_title": "Esempio",
"example_lines": [
"Telefono → VPS pubblico → trasporto Relay protetto → WGTools di casa → rete necessaria"
],
"warning": ""
},
{
"title": "Diagnostica",
"paragraphs": [
"La diagnostica controlla WireGuard, inoltro IP, porte, rotte e servizi, utile quando un client non si collega o una rete non risponde."
],
"bullets": [
"Verifica prima che l'interfaccia sia attiva e che esista un handshake recente. Se l'handshake funziona ma la destinazione no, controlla rotte, firewall e percorso di ritorno.",
"Server → Percorso mostra gli hop di traceroute che rispondono, RTT medio e aumento della latenza. Gli hop senza risposta vengono indicati in modo neutro, non come guasti accertati.",
"La mappa interattiva consente spostamento e zoom; toccando un hop appaiono IP, località approssimativa, ASN/provider e RTT.",
"Con la mappa attiva, gli IP pubblici vengono geolocalizzati tramite ipwho.is e le mappe caricate da OpenStreetMap; gli IP privati non vengono inviati. Traceroute non misura la banda in Mbit/s.",
"La diagnostica di per sé non cambia la configurazione."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Applicazione sicura delle modifiche",
"paragraphs": [
"Le modifiche a server, rotte e firewall possono richiedere un breve riavvio di WireGuard."
],
"bullets": [
"WGTools salva prima una copia della configurazione.",
"Se la nuova configurazione non si avvia, tenta di ripristinare automaticamente quella precedente.",
"I client possono disconnettersi per poco e di norma si ricollegano da soli."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Scheda Configurazione",
"paragraphs": [
"È un editor diretto di /etc/wireguard/<interface>.conf per opzioni non esposte dai moduli standard."
],
"bullets": [
"Usalo solo se conosci la sintassi WireGuard e i comandi PostUp/PostDown.",
"WGTools convalida ed esegue un backup del file prima di applicarlo.",
"Una configurazione insolita può limitare la modifica automatica per proteggere regole manuali. Non condividere PrivateKey, PresharedKey o altri segreti."
],
"example_title": "Esempio",
"example_lines": [
"[Interface]",
"Address = 10.0.0.1/24",
"ListenPorta = 51820",
"",
"[Peer]",
"AllowedIPs = 10.0.0.2/32"
],
"warning": "Non condividere PrivateKey, PresharedKey o altri segreti."
}
]
},
{
"id": "clients",
"title": "Client",
"intro": "Un client può essere un telefono, laptop, router o altro peer WireGuard. Questa pagina gestisce configurazioni, criteri di accesso, scadenze, orari e Site-to-Site.",
"topics": [
{
"title": "Client normale",
"paragraphs": [
"Scegli Client per telefoni e computer. WGTools assegna un indirizzo VPN libero e crea le chiavi."
],
"bullets": [
"Il nome è soltanto un'etichetta dentro WGTools.",
"Endpoint nella configurazione generata è l'indirizzo usato dal dispositivo per trovare il server WireGuard.",
"Il DNS può essere specifico del client oppure ereditato da un modello di gruppo."
],
"example_title": "Esempio",
"example_lines": [
"Nome: Telefono",
"Indirizzo VPN: 10.0.0.3/32",
"Endpoint: vpn.example.com:51820"
],
"warning": ""
},
{
"title": "Traffico VPN e AllowedIPs",
"paragraphs": [
"AllowedIPs nella configurazione del client definisce cosa il dispositivo invia nel tunnel. È diverso dai permessi configurati sul server."
],
"bullets": [
"Tutto il traffico inoltra sia Internet sia le reti remote nella VPN; puoi anche selezionare soltanto alcune reti.",
"L'esclusione della rete locale permette di raggiungere direttamente stampante o router pur usando Internet tramite VPN.",
"Il server può bloccare una destinazione anche se compare in AllowedIPs."
],
"example_title": "Esempio",
"example_lines": [
"0.0.0.0/0 — tutto il traffico IPv4 nella VPN",
"192.168.50.0/24 — solo una rete remota"
],
"warning": ""
},
{
"title": "Gruppi di client",
"paragraphs": [
"Un gruppo permette di definire una volta sola regole e modello di configurazione da riutilizzare per diversi client."
],
"bullets": [
"I gruppi regolano accesso a Internet, LAN ed eccezioni di consenso o blocco.",
"Possono fornire rotte, DNS e Keepalive predefiniti alle nuove configurazioni.",
"Le modifiche dei criteri server sono immediate, ma un file già installato sul telefono non cambia da solo: applica il modello aggiornato e consegna un nuovo file o QR se necessario."
],
"example_title": "Esempio",
"example_lines": [
"Gruppo «Ospiti»",
"Internet: consentito",
"LAN: bloccata",
"Membri: Telefono-1, Tabellat-1"
],
"warning": ""
},
{
"title": "Criteri del singolo client",
"paragraphs": [
"Un client può ereditare i criteri del gruppo oppure avere eccezioni proprie."
],
"bullets": [
"Un'eccezione per il singolo client, sia di consenso sia di blocco, prevale su quella di gruppo.",
"Per esempio, un dipendente può accedere a un server vietato agli altri membri del gruppo."
],
"example_title": "Esempio",
"example_lines": [
"Il gruppo blocca 192.168.1.0/24",
"Il client consente anche 192.168.1.50/32"
],
"warning": ""
},
{
"title": "Client Site-to-Site",
"paragraphs": [
"Usa Site-to-Site quando un peer rappresenta un'intera rete. Inserisci le reti dietro al peer come Reti remote."
],
"bullets": [
"WGTools aggiunge automaticamente le relative rotte al server.",
"Successivamente possono essere pubblicate tramite Nodes.",
"Un normale telefono o laptop non richiede la modalità Site-to-Site."
],
"example_title": "Esempio",
"example_lines": [
"Peer router: 10.0.0.20/32",
"Rete remota: 192.168.50.0/24"
],
"warning": ""
},
{
"title": "Connessione diretta e VPS Relay",
"paragraphs": [
"Quando VPS Relay è installato per l'interfaccia, i client compatibili possono scegliere la connessione diretta o tramite Relay."
],
"bullets": [
"La connessione diretta è preferibile quando la porta WireGuard è raggiungibile da Internet.",
"Relay aiuta con CGNAT o in assenza di UDP in ingresso.",
"Indirizzo VPN e criteri di accesso del client non cambiano."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "PSK, isolamento e rotazione delle chiavi",
"paragraphs": [
"WireGuard usa già chiavi pubbliche/private. Un PSK opzionale aggiunge un segreto condiviso."
],
"bullets": [
"L'isolamento impedisce al client di comunicare con altri indirizzi della stessa rete VPN.",
"La rotazione crea una nuova coppia di chiavi e, se abilitato, un nuovo PSK. La vecchia configurazione smette di funzionare: consegna un nuovo file o QR.",
"Indirizzo VPN, gruppo, orari e statistiche del traffico restano invariati."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Accesso temporaneo",
"paragraphs": [
"Un client può scadere dopo 1, 3 o 6 ore, un giorno oppure a una data e ora personalizzate."
],
"bullets": [
"Alla scadenza il servizio in background esegue l'azione scelta.",
"Per riattivare un client scaduto ma salvato, imposta una nuova scadenza oppure Nessun limite."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Programmazione degli accessi",
"paragraphs": [
"Gli orari abilitano e bloccano automaticamente un client in giorni e fasce prestabilite senza sostituirne la configurazione."
],
"bullets": [
"Si utilizza l'ora locale del server WireGuard.",
"Le fasce possono attraversare la mezzanotte, per esempio 22:00–06:00.",
"Al successivo periodo consentito WGTools ripristina lo stesso peer."
],
"example_title": "Esempio",
"example_lines": [
"Lun–Ven: 08:00–19:00"
],
"warning": ""
},
{
"title": "Stato, Endpoint e traffico",
"paragraphs": [
"La tabella mostra ultimo handshake, Endpoint e totali RX/TX."
],
"bullets": [
"Un handshake recente indica che il client ha comunicato da poco con il server.",
"L'Endpoint di un telefono può cambiare passando tra Wi-Fi e LTE: è normale.",
"La ricerca rapida filtra per nome, indirizzo, gruppo e stato."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Configurazione e QR",
"paragraphs": [
"Un file .conf è adatto a computer e router, mentre il QR all'app mobile WireGuard."
],
"bullets": [
"La PrivateKey del client si trova sia nel file sia nel QR: proteggili come una password.",
"La nuova emissione della configurazione di un client gestito riutilizza le chiavi conservate in WGTools.",
"Dopo la rotazione delle chiavi fornisci sempre una nuova configurazione."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Modifica ed eliminazione",
"paragraphs": [
"WGTools esegue un backup della configurazione WireGuard prima delle modifiche gestite e le applica in sicurezza."
],
"bullets": [
"Eliminare un client gestito rimuove peer, chiavi archiviate e relative regole.",
"Un file già salvato sul dispositivo non viene cancellato da remoto, ma non può più stabilire la connessione."
],
"example_title": "",
"example_lines": [],
"warning": ""
}
]
},
{
"id": "settings",
"title": "Impostazioni",
"intro": "Qui trovi aspetto, backup, Telegram, e-mail, HTTPS, utenti, audit e aggiornamenti.",
"topics": [
{
"title": "Aspetto e lingua",
"paragraphs": [
"Scegli il tema chiaro, scuro o di sistema e la lingua dell'interfaccia."
],
"bullets": [
"Ridurre la barra laterale lascia visibili solo le icone.",
"Lo stato della barra viene memorizzato nel browser e cambia subito.",
"La lingua scelta viene salvata da WGTools."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Aggiornamento dello stato",
"paragraphs": [
"L'intervallo di aggiornamento definisce la frequenza con cui vengono aggiornati i dati di server e client. La soglia online stabilisce per quanto tempo dopo un handshake un peer risulta connesso."
],
"bullets": [],
"example_title": "Esempio",
"example_lines": [
"Aggiornamento: 5 s",
"Online: 180 s"
],
"warning": ""
},
{
"title": "Backup automatici della configurazione",
"paragraphs": [
"Prima delle modifiche rischiose WGTools conserva una cronologia delle configurazioni WireGuard per ripristinare rapidamente quella precedente."
],
"bullets": [
"Puoi scegliere il numero di copie conservate.",
"Questa cronologia è diversa dal backup completo e portabile di WGTools."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Backup completo e ripristino",
"paragraphs": [
"Il file .wgtbackup serve per migrare su un nuovo server o recuperare dopo un guasto."
],
"bullets": [
"Include configurazioni WireGuard, database di utenti/impostazioni, gruppi, dati dei client, impostazioni Telegram/SMTP e stato necessario per ripristinare VPS Relay/Nodes.",
"WGTools verifica l'archivio e salva lo stato attuale prima del ripristino. Se l'operazione fallisce, tenta un rollback automatico.",
"Dopo il ripristino la sessione web corrente viene chiusa; accedi con un account del database ripristinato."
],
"example_title": "",
"example_lines": [],
"warning": ".wgtbackup contiene chiavi private, PSK, hash delle password, token Telegram e password SMTP. Custodiscilo come una password."
},
{
"title": "Bot Telegram",
"paragraphs": [
"Telegram permette di controllare e gestire WireGuard senza aprire il pannello web."
],
"bullets": [
"Crea il bot con @BotFather, incolla il token, attivalo e invia /start.",
"Se il tuo ID Telegram non è autorizzato, il bot mostra l'ID numerico: aggiungilo alla lista consentita.",
"I comandi amministrativi sono accettati soltanto nelle chat private: stato, client, creazione/eliminazione, riconsegna configurazioni/QR e gestione WireGuard."
],
"example_title": "Esempio",
"example_lines": [
"Endpoint predefinito: vpn.example.com",
"DNS: 1.1.1.1, 8.8.8.8"
],
"warning": ""
},
{
"title": "E-mail / SMTP e recupero password",
"paragraphs": [
"SMTP gestisce «Password dimenticata?» nella schermata di accesso."
],
"bullets": [
"Sono supportati STARTTLS, TLS/SSL e SMTP semplice su una LAN affidabile. Il nome utente può essere vuoto se il server SMTP non richiede autenticazione.",
"La password resta salvata localmente e non viene mai restituita al browser. Il pulsante Test invia un messaggio all'indirizzo scelto.",
"I codici di recupero sono monouso, memorizzati come hash, validi 15 minuti e limitati nei tentativi."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "HTTPS integrato",
"paragraphs": [
"WGTools può fornire HTTPS senza Nginx, Caddy o proxy inversi esterni."
],
"bullets": [
"Inserisci dominio/IP pubblico, e-mail, porta HTTPS e percorso privato, poi scegli Ottieni / rinnova certificato. L'azione salva anche le impostazioni HTTPS.",
"HTTPS si può abilitare solo con un certificato appropriato. Dopo l'emissione attivalo e premi Salva; quando dominio o IP cambia serve un nuovo certificato.",
"La porta TCP 80 deve essere raggiungibile da Internet per emissione e rinnovo. Il pannello usa la porta scelta, per esempio 443 o 8443. Il percorso privato imposta l'URL, ad esempio /MyWGTools/; gli altri percorsi restituiscono 404 con HTTPS attivo.",
"WGTools indica le porte locali occupate e non arresta server web di terzi; un timer systemd rinnova automaticamente il certificato.",
"Un percorso privato non sostituisce l'autenticazione. Evita di esporre inutilmente il pannello e usa credenziali robuste."
],
"example_title": "Esempio",
"example_lines": [
"https://wg.example.com/MyWGTools/"
],
"warning": "Un percorso privato non sostituisce l’autenticazione. Evita di esporre il pannello inutilmente e usa credenziali robuste."
},
{
"title": "Utenti",
"paragraphs": [
"Il primo utente viene creato durante la configurazione di WGTools. Altri utenti possono essere aggiunti da Impostazioni."
],
"bullets": [
"Attualmente tutti gli utenti hanno gli stessi permessi. È possibile cambiare e-mail/password ed eliminare account.",
"Ogni utente può abilitare MFA con Google Authenticator o app TOTP e ricevere una volta codici di recupero.",
"Se perde l'app di autenticazione, root può disattivare MFA tramite il comando wgtools. Non puoi eliminare l'utente corrente né l'ultimo account.",
"Modifiche o recupero password e attivazione/disattivazione MFA invalidano le vecchie sessioni web dell'utente."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Registro di audit",
"paragraphs": [
"L'audit registra le operazioni di amministrazione web/Telegram e la cronologia utile delle connessioni WireGuard."
],
"bullets": [
"Le azioni web riportano il nome WGTools; quelle Telegram @username, se disponibile, e ID numerico.",
"Sono registrati cambiamenti di configurazione, visualizzazione di configurazioni/QR, aggiornamenti ed errori rilevanti.",
"Password, chiavi private, PSK, token e configurazioni complete non vengono registrati. Il registro viene cancellato automaticamente alla fine del periodo di conservazione."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Aggiornamenti WGTools",
"paragraphs": [
"WGTools controlla periodicamente le versioni stabili su GitHub ma non installa aggiornamenti senza conferma esplicita."
],
"bullets": [
"Una nuova versione genera un avviso.",
"Prima di aggiornare crea un backup .wgtbackup completo e un archivio separato per il rollback dell'applicazione.",
"Se la nuova versione non parte, prova a ripristinare quella precedente. La versione corrente è mostrata nell'interfaccia e in Informazioni."
],
"example_title": "",
"example_lines": [],
"warning": ""
},
{
"title": "Comando wgtools e accesso di emergenza",
"paragraphs": [
"Il comando root wgtools è utile quando il pannello web non è raggiungibile."
],
"bullets": [
"Mostra stato di WGTools, WireGuard, Nodes, Telegram, timer e Relay Agent locale e URL del pannello.",
"Può avviare, fermare e riavviare pannello e WireGuard e leggere i log. Con porta HTTPS o percorso privato errati permette di disabilitare HTTPS integrato e tornare a HTTP.",
"Consente a root di disabilitare MFA in emergenza se l'utente ha perso l'autenticatore e i codici.",
"Disinstallare WGTools rimuove pannello e servizi mantenendo WireGuard normale e dati riutilizzabili. FULL CLEANUP, dopo conferma DELETE ALL, cancella WGTools, Relay locale e WireGuard da questo host, senza toccare agenti Relay su altri VPS."
],
"example_title": "Esempio",
"example_lines": [
"root@server:~# wgtools"
],
"warning": ""
},
{
"title": "Dove sono archiviati i dati",
"paragraphs": [
"Normalmente non occorre modificare i file a mano, ma i percorsi sono utili per diagnostica e pianificazione dei backup."
],
"bullets": [],
"example_title": "Percorsi principali",
"example_lines": [
"/etc/wireguard/wg0.conf — configurazione WireGuard",
"/var/lib/wgtools/wgtools.db — utenti e impostazioni",
"/var/lib/wgtools/clients/ — dati dei client gestiti",
"/var/lib/wgtools/backups/ — cronologia configurazioni",
"/var/lib/wgtools/update-backups/ — archivi rollback aggiornamento"
],
"warning": ""
}
]
}
]
+18
View File
@@ -4,6 +4,7 @@ import sqlite3
import time
import re
import base64
import json
from pathlib import Path
from typing import Any
@@ -12,6 +13,23 @@ from .settings import DATABASE_PATH, ONLINE_THRESHOLD_SECONDS, REFRESH_SECONDS
DEFAULT_BACKUP_RETENTION = 20
def get_service_policy() -> dict[str, Any]:
return json.loads(_get('forward_service_policy', '{"enabled":false,"mode":"list","services":[]}'))
def update_service_policy(enabled: bool, mode: str, services: list[str]) -> dict[str, Any]:
if mode not in {'list', 'custom', 'combo'}:
raise ValueError('Nieprawidłowy tryb usług')
services = list(dict.fromkeys(s.strip() for s in services if s.strip()))
if len(services) > 1000 or any(len(s) > 120 or any(ord(c) < 32 for c in s) or s.casefold() == 'other' for s in services):
raise ValueError('Nieprawidłowa lista usług')
if enabled and mode in {'list', 'combo'} and not services:
raise ValueError('Dodaj co najmniej jedną usługę do listy')
policy = {'enabled': enabled, 'mode': mode, 'services': services}
_set('forward_service_policy', json.dumps(policy, ensure_ascii=True))
return policy
def get_branding() -> dict[str, Any]:
values = _get_many({"brand_name": "WGTools-Extended", "brand_color": "#8f1f27", "brand_logo": ""})
return {"name": values["brand_name"], "color": values["brand_color"], "logo": values["brand_logo"]}
+3 -2
View File
@@ -191,8 +191,9 @@ def update_telegram_settings(
dns = _normalize_dns(default_dns)
endpoint = _normalize_endpoint(default_endpoint)
language = str(language or "auto").strip().lower()
if language not in {"auto", "en", "ru"}:
raise ValueError("Bot language must be auto, en or ru")
if language not in {"auto", "en", "ru", "pl"}:
raise ValueError("Nieprawidłowy język bota")
language = "pl"
if enabled and not token:
raise ValueError("Configure a BotFather token before enabling the Telegram bot")
-1101
View File
File diff suppressed because it is too large. Load diff
+1 -1101
View File
File diff suppressed because it is too large. Load diff
-1101
View File
File diff suppressed because it is too large. Load diff
-1101
View File
File diff suppressed because it is too large. Load diff
-1101
View File
File diff suppressed because it is too large. Load diff
+1 -1101
View File
File diff suppressed because it is too large. Load diff
+53 -12
View File
@@ -30,7 +30,7 @@ from app.core.auth import (
from app.core.audit import init_audit_database, list_audit, merge_wireguard_last_seen, record_wireguard_connections, write_audit
from app.core.helper import HelperError, run_helper
from app.core.settings import APP_NAME, ONLINE_THRESHOLD_SECONDS, REFRESH_SECONDS, SESSION_MAX_AGE_SECONDS, VERSION, WG_INTERFACE
from app.core.preferences import get_preferences, init_preferences, update_preferences, get_branding, update_branding
from app.core.preferences import get_preferences, init_preferences, update_preferences, get_branding, update_branding, get_service_policy, update_service_policy
from app.core.telegram_config import get_telegram_settings, init_telegram_settings, test_telegram_connection, update_telegram_settings
from app.core.mail_config import (
get_mail_settings, init_mail_settings, mask_email, password_recovery_available,
@@ -55,7 +55,7 @@ from app.core.nodes import (
BASE_DIR = Path(__file__).resolve().parent
LOCALE_DIR = BASE_DIR / "locales"
SUPPORTED_LANGUAGES = {"en", "ru", "de", "fr", "it", "es", "pl"}
SUPPORTED_LANGUAGES = {"pl"}
DEFAULT_LANGUAGE = "pl"
PROCESS_INSTANCE = secrets.token_urlsafe(12)
MFA_CHALLENGE_MAX_AGE_SECONDS = 5 * 60
@@ -75,11 +75,6 @@ def _load_locales() -> dict[str, dict[str, str]]:
LOCALES = _load_locales()
# Sparse translation overrides are resolved against English at startup.
# This preserves meaning for untranslated strings and newly added keys.
for _lang, _messages in LOCALES.items():
if _lang != "en":
LOCALES[_lang] = {**LOCALES.get("en", {}), **_messages}
templates = Jinja2Templates(directory=str(BASE_DIR / "templates"))
app = FastAPI(title=APP_NAME, version=VERSION, docs_url=None, redoc_url=None)
app.mount("/static", StaticFiles(directory=str(BASE_DIR / "static")), name="static")
@@ -478,6 +473,14 @@ class ExtendedForwardRequest(BaseModel):
protocol: str = Field(max_length=4)
restrict_sources: bool = False
allowed_sources: list[str] = Field(default_factory=list, max_length=32)
service: str = Field(default='', max_length=120)
confirmation: str = Field(default='', max_length=200)
class ServicePolicyRequest(BaseModel):
enabled: bool = False
mode: str = 'list'
services: list[str] = Field(default_factory=list, max_length=1000)
class ExtendedForwardUpdateRequest(ExtendedForwardRequest):
@@ -945,6 +948,44 @@ def api_branding(payload: BrandingRequest, request: Request):
return JSONResponse(status_code=400, content={"ok": False, "error": str(exc)})
@app.get('/api/service-policy')
def api_service_policy_get():
return {'ok': True, 'policy': get_service_policy()}
@app.post('/api/service-policy')
def api_service_policy_set(payload: ServicePolicyRequest, request: Request):
try:
policy = update_service_policy(**payload.model_dump())
audit_action(request, 'settings.service_policy_updated', object='forwarding services', result='saved', details=policy)
return {'ok': True, 'policy': policy}
except ValueError as exc:
return JSONResponse(status_code=400, content={'ok': False, 'error': str(exc)})
SERVICE_CONFIRMATION = 'Nie będę używać tego tunelu do złośliwego oprogramowania, nadużyć ani niedozwolonych usług.'
def forward_payload(payload: ExtendedForwardRequest, request: Request) -> dict:
data = payload.model_dump()
policy = get_service_policy()
service = payload.service.strip()
if policy['enabled']:
if not service or any(ord(c) < 32 for c in service):
raise ValueError('Podaj nazwę usługi')
if policy['mode'] == 'list' and service not in policy['services']:
raise ValueError('Wybierz usługę z listy')
if payload.confirmation != SERVICE_CONFIRMATION:
raise ValueError('Wpisz dokładnie wymagane potwierdzenie odpowiedzialności')
data['service'] = service
data['responsibility'] = {'text': SERVICE_CONFIRMATION, 'user': audit_username(request), 'time': int(time.time())}
else:
data['service'] = ''
data['responsibility'] = None
data.pop('confirmation', None)
return data
@app.get("/api/update/check")
def api_update_check(request: Request):
try:
@@ -1760,7 +1801,7 @@ def api_extended_groups_set(payload: ExtendedIPGroupRequest, request: Request):
@app.get("/api/extended/forwardings")
def api_extended_forward_get(request: Request):
try:
return run_helper("extended_forward_get", interface=request_interface(request))
return {**run_helper("extended_forward_get", interface=request_interface(request)), 'service_policy': get_service_policy()}
except HelperError as exc:
return JSONResponse(status_code=400, content={"ok": False, "error": str(exc)})
@@ -1768,20 +1809,20 @@ def api_extended_forward_get(request: Request):
@app.post("/api/extended/forwardings")
def api_extended_forward_add(payload: ExtendedForwardRequest, request: Request):
try:
result = run_helper("extended_forward_add", payload.model_dump(), interface=request_interface(request))
result = run_helper("extended_forward_add", forward_payload(payload, request), interface=request_interface(request))
audit_action(request, "network.forward_added", object=request_interface(request), result="saved", details=payload.model_dump())
return result
except HelperError as exc:
except (HelperError, ValueError) as exc:
return JSONResponse(status_code=400, content={"ok": False, "error": str(exc)})
@app.post("/api/extended/forwardings/update")
def api_extended_forward_update(payload: ExtendedForwardUpdateRequest, request: Request):
try:
result = run_helper("extended_forward_update", payload.model_dump(), interface=request_interface(request))
result = run_helper("extended_forward_update", forward_payload(payload, request), interface=request_interface(request))
audit_action(request, "network.forward_updated", object=request_interface(request), result="saved", details=payload.model_dump())
return result
except HelperError as exc:
except (HelperError, ValueError) as exc:
return JSONResponse(status_code=400, content={"ok": False, "error": str(exc)})
+25
View File
@@ -427,3 +427,28 @@ html[data-theme="light"] .topbar-theme-icon .theme-icon-moon{display:block}
.sidebar-collapse-button.is-collapsed svg{transform:scaleX(-1)}
html.sidebar-pref-collapsed .sidebar-collapse-caption,body.sidebar-collapsed .sidebar-collapse-caption{display:none}
@media(max-width:760px){.sidebar-collapse-caption{display:none}.topbar-audit-toggle{width:29px;height:29px;flex-basis:29px}}
/* Przekierowania: czytelne pola i potwierdzenie użytkownika. */
.forward-restrict{margin-top:18px;min-height:32px}
.forward-section-title{margin:26px 0 10px;font-size:15px}
.forward-warning{margin-top:14px;padding:15px 17px;border-left:4px solid #e88732;border-radius:4px;background:#80431b;color:#fff;line-height:1.55;font-size:13px}
.forward-warning b{font-size:14px}.forward-warning p{margin:10px 0 0}
.forward-confirmation-example{margin-top:12px;padding:14px 15px;border:1px solid var(--border);border-radius:5px;background:var(--panel-2);color:var(--muted);font-size:13px;line-height:1.55;user-select:none;-webkit-user-select:none;overflow-wrap:anywhere}
.forward-confirmation-input{margin-bottom:18px}.forward-confirmation-input textarea{min-height:76px;resize:vertical;font:inherit;font-size:14px;line-height:1.5}
#extended-forward-form>.btn{margin-top:16px}
#extended-forward-list{border-top:1px solid var(--border)}
@media(max-width:760px){
html.sidebar-pref-collapsed body,body,body.sidebar-collapsed{padding-left:0;padding-bottom:calc(76px + env(safe-area-inset-bottom))}
.sidebar,html.sidebar-pref-collapsed .sidebar,body.sidebar-collapsed .sidebar{position:fixed;top:auto;right:0;bottom:0;width:100%;height:auto;transform:none;overflow:visible;border-right:0;border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom);z-index:25}
.sidebar nav{display:flex;padding:0;width:100%}
.sidebar .nav-item,html.sidebar-pref-collapsed .nav-item,body.sidebar-collapsed .nav-item{flex:1;min-width:0;height:64px;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:5px 2px;border-left:0;border-top:2px solid transparent;font-size:10px}
.sidebar .nav-item.active{border-top-color:var(--accent);background:#313942}
.sidebar .nav-label,html.sidebar-pref-collapsed .nav-label,body.sidebar-collapsed .nav-label{display:block;opacity:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.sidebar-bottom{display:none}.topbar{padding:0 12px;gap:8px}.brand{gap:7px;min-width:0}.brand-title{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brand-mark{width:32px;height:32px;flex:0 0 32px}
.topbar-right{gap:5px;min-width:0}.interface-switcher-wrap{min-width:0}.interface-switcher-button.top-status{max-width:130px}.user-chip{padding-left:5px}.content{padding:16px 12px}.page-head h1{font-size:22px}
.card-head{align-items:flex-start;flex-wrap:wrap}.card-head>*{min-width:0}.settings-tabs,.server-editor-tabs,.client-editor-tabs{max-width:100%;overflow-x:auto}
.modal-backdrop{padding:10px;align-items:center}.modal-card{max-height:calc(100dvh - 20px)}.modal-actions{flex-wrap:wrap}.interface-manager-action{display:flex;flex-wrap:wrap}.interface-manager-row{grid-template-columns:13px minmax(0,1fr);align-items:start}.interface-manager-action{grid-column:2;justify-self:start}
.setup-grid input,.setup-grid select,.field-block input,.field-block textarea{font-size:16px}.forward-warning{padding:13px 14px}.forward-confirmation-input textarea{font-size:16px}
.group-row,.group-row>div{min-width:0;overflow-wrap:anywhere}.group-row .action-row{flex-wrap:wrap}
}
@media(max-width:480px){.brand-title{display:none}.interface-switcher-button.top-status{max-width:112px}.topbar-right{gap:4px}.topbar-help{display:none}}
-1101
View File
File diff suppressed because it is too large. Load diff
-1101
View File
File diff suppressed because it is too large. Load diff
-1101
View File
File diff suppressed because it is too large. Load diff
-1101
View File
File diff suppressed because it is too large. Load diff
-1101
View File
File diff suppressed because it is too large. Load diff
+31 -8
View File
@@ -1083,7 +1083,7 @@
const loadGroups=async()=>{
try{const r=await fetch(appUrl('/api/extended/ip-groups'));const d=await r.json();if(!r.ok)throw new Error(d.error);
$('extended-groups-list').innerHTML=Object.entries(d.groups||{}).filter(([name])=>!name.startsWith('_wgext_network_')).map(([name,g])=>`<div class="group-row"><div><b>${esc(name)}</b><p>${esc((g.addresses||[]).join(', '))}</p><p>Sieci: ${esc((g.interfaces||[]).join(', '))}</p></div><div class="action-row"><button class="btn small" type="button" data-ext-group-edit="${esc(name)}">Edytuj</button><button class="btn small danger" type="button" data-ext-group-delete="${esc(name)}">Usuń</button></div></div>`).join('')||'<p>Brak grup adresów.</p>';
$('extended-groups-list').insertAdjacentHTML('beforeend',`<h3>Przegląd przekierowań</h3>`+(d.forwards||[]).map(f=>`<p>${esc(f.interface)}: ${esc(f.public_ip)}:${Number(f.public_port)} / ${esc(f.protocol)} → ${esc(f.target_ip)}:${Number(f.target_port)}</p>`).join(''));
$('extended-groups-list').insertAdjacentHTML('beforeend',`<h3>Przegląd przekierowań</h3>`+(d.forwards||[]).map(f=>`<p>${esc(f.interface)}: ${esc(f.public_ip)}:${Number(f.public_port)} / ${esc(f.protocol)} → ${esc(f.target_ip)}:${Number(f.target_port)}${f.service?' · Usługa: '+esc(f.service):''}${f.responsibility?' · Potwierdził: '+esc(f.responsibility.user)+' ('+esc(new Date(f.responsibility.time*1000).toLocaleString('pl-PL'))+')':''}</p>`).join(''));
return d.groups||{};
}catch(err){operationStatus('extended-group-status',err.message,'error');return {};}
};
@@ -1094,12 +1094,29 @@
}
if(page==='clients' && $('extended-forward-form')){
let forwards=[], editing='';
const reset=()=>{editing='';$('extended-forward-form').reset();$('extended-forward-restrict').checked=false;syncSources();$('extended-forward-submit').textContent='Dodaj przekierowanie';$('extended-forward-cancel').hidden=true;};
let servicePolicy={enabled:false,mode:'list',services:[]};
const syncService=()=>{
const on=servicePolicy.enabled, mode=servicePolicy.mode, selected=$('forward-service-select').value;
$('forward-service-section').hidden=!on;
$('forward-service-select-wrap').hidden=!on||mode==='custom';
$('forward-service-custom-wrap').hidden=!on||(mode!=='custom'&&selected!=='__other__');
$('forward-service-select').required=on&&mode!=='custom';
$('forward-service-custom').required=on&&(mode==='custom'||selected==='__other__');
$('forward-service-confirmation').required=on;
};
$('forward-service-select').addEventListener('change',syncService);
const confirmation=$('forward-service-confirmation');
const example=$('forward-confirmation-example');
const validateConfirmation=()=>confirmation.setCustomValidity(confirmation.value && confirmation.value!==example.textContent?'Przepisz dokładnie podany tekst.':'');
confirmation.addEventListener('input',validateConfirmation);
['paste','drop'].forEach(name=>confirmation.addEventListener(name,e=>e.preventDefault()));
['copy','cut','dragstart','contextmenu'].forEach(name=>example.addEventListener(name,e=>e.preventDefault()));
const reset=()=>{editing='';$('extended-forward-form').reset();confirmation.setCustomValidity('');$('extended-forward-restrict').checked=false;syncSources();$('extended-forward-submit').textContent='Dodaj przekierowanie';$('extended-forward-cancel').hidden=true;syncService();};
const syncSources=()=>{const enabled=$('extended-forward-restrict').checked;$('extended-forward-sources-wrap').hidden=!enabled;$('extended-forward-sources').required=enabled;};
const loadForwards=async()=>{const r=await fetch(appUrl('/api/extended/forwardings'));const d=await r.json();if(!r.ok)throw new Error(d.error);forwards=d.forwards||[];const current=$('extended-forward-public').value;$('extended-forward-public').innerHTML=(d.addresses||[]).map(ip=>`<option value="${esc(ip)}">${esc(ip)}</option>`).join('');if((d.addresses||[]).includes(current))$('extended-forward-public').value=current;$('extended-forward-list').innerHTML=forwards.map(f=>`<div class="group-row"><div><span>${esc(f.public_ip)}:${Number(f.public_port)} / ${esc(f.protocol)} → ${esc(f.target_ip)}:${Number(f.target_port)}</span><p>${f.allowed_sources?.length?'Dozwolone adresy: '+esc(f.allowed_sources.join(', ')):'Dostęp ze wszystkich adresów'}</p></div><div class="action-row"><button class="btn small" type="button" data-ext-forward-edit="${esc(f.id)}">Edytuj</button><button class="btn small danger" type="button" data-ext-forward-delete="${esc(f.id)}">Usuń</button></div></div>`).join('')||'<p>Brak przekierowań.</p>';};
const loadForwards=async()=>{const r=await fetch(appUrl('/api/extended/forwardings'));const d=await r.json();if(!r.ok)throw new Error(d.error);forwards=d.forwards||[];servicePolicy=d.service_policy||servicePolicy;const sel=$('forward-service-select');sel.innerHTML='<option value="">Wybierz usługę</option>'+servicePolicy.services.map(x=>`<option value="${esc(x)}">${esc(x)}</option>`).join('')+(servicePolicy.mode==='combo'?'<option value="__other__">Inna</option>':'');syncService();const current=$('extended-forward-public').value;$('extended-forward-public').innerHTML=(d.addresses||[]).map(ip=>`<option value="${esc(ip)}">${esc(ip)}</option>`).join('');if((d.addresses||[]).includes(current))$('extended-forward-public').value=current;$('extended-forward-list').innerHTML=forwards.map(f=>`<div class="group-row"><div><span>${esc(f.public_ip)}:${Number(f.public_port)} / ${esc(f.protocol)} → ${esc(f.target_ip)}:${Number(f.target_port)}</span><p>${f.allowed_sources?.length?'Dozwolone adresy: '+esc(f.allowed_sources.join(', ')):'Dostęp ze wszystkich adresów'}</p></div><div class="action-row"><button class="btn small" type="button" data-ext-forward-edit="${esc(f.id)}">Edytuj</button><button class="btn small danger" type="button" data-ext-forward-delete="${esc(f.id)}">Usuń</button></div></div>`).join('')||'<p>Brak przekierowań.</p>';};
$('extended-forward-restrict').addEventListener('change',syncSources);$('extended-forward-cancel').addEventListener('click',reset);
$('extended-forward-form').addEventListener('submit',async e=>{e.preventDefault();const restricted=$('extended-forward-restrict').checked;const payload={public_ip:$('extended-forward-public').value,public_port:Number($('extended-forward-public-port').value),target_ip:$('extended-forward-target').value,target_port:Number($('extended-forward-target-port').value),protocol:$('extended-forward-protocol').value,restrict_sources:restricted,allowed_sources:restricted?$('extended-forward-sources').value.split(',').map(x=>x.trim()).filter(Boolean):[]};if(editing)payload.id=editing;const button=$('extended-forward-submit');button.disabled=true;try{const r=await fetch(appUrl(editing?'/api/extended/forwardings/update':'/api/extended/forwardings'),{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(payload)});const d=await r.json();if(!r.ok)throw new Error(d.error);reset();await loadForwards();operationStatus('extended-forward-status','Zapisano przekierowanie.','success');}catch(err){operationStatus('extended-forward-status',err.message,'error');}finally{button.disabled=false;}});
$('extended-forward-list').addEventListener('click',async e=>{const edit=e.target.closest('[data-ext-forward-edit]'),del=e.target.closest('[data-ext-forward-delete]');if(edit){const f=forwards.find(x=>x.id===edit.dataset.extForwardEdit);if(!f)return;editing=f.id;$('extended-forward-public').value=f.public_ip;$('extended-forward-public-port').value=f.public_port;$('extended-forward-target').value=f.target_ip;$('extended-forward-target-port').value=f.target_port;$('extended-forward-protocol').value=f.protocol;$('extended-forward-restrict').checked=Boolean(f.allowed_sources?.length);$('extended-forward-sources').value=(f.allowed_sources||[]).join(', ');syncSources();$('extended-forward-submit').textContent='Zapisz zmiany';$('extended-forward-cancel').hidden=false;operationStatus('extended-forward-status','Edytujesz przekierowanie.','working');$('extended-forward-form').scrollIntoView({behavior:'smooth',block:'center'});return;}if(!del||!confirm('Usunąć przekierowanie?'))return;try{const r=await fetch(appUrl('/api/extended/forwardings/delete'),{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({id:del.dataset.extForwardDelete})});const d=await r.json();if(!r.ok)throw new Error(d.error);if(editing===del.dataset.extForwardDelete)reset();await loadForwards();}catch(err){operationStatus('extended-forward-status',err.message,'error');}});
$('extended-forward-form').addEventListener('submit',async e=>{e.preventDefault();const restricted=$('extended-forward-restrict').checked;const payload={public_ip:$('extended-forward-public').value,public_port:Number($('extended-forward-public-port').value),target_ip:$('extended-forward-target').value,target_port:Number($('extended-forward-target-port').value),protocol:$('extended-forward-protocol').value,service:servicePolicy.enabled?(servicePolicy.mode==='custom'||$('forward-service-select').value==='__other__' ? $('forward-service-custom').value : $('forward-service-select').value):'',confirmation:servicePolicy.enabled?$('forward-service-confirmation').value:'',restrict_sources:restricted,allowed_sources:restricted?$('extended-forward-sources').value.split(',').map(x=>x.trim()).filter(Boolean):[]};if(editing)payload.id=editing;const button=$('extended-forward-submit');button.disabled=true;try{const r=await fetch(appUrl(editing?'/api/extended/forwardings/update':'/api/extended/forwardings'),{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(payload)});const d=await r.json();if(!r.ok)throw new Error(d.error);reset();await loadForwards();operationStatus('extended-forward-status','Zapisano przekierowanie.','success');}catch(err){operationStatus('extended-forward-status',err.message,'error');}finally{button.disabled=false;}});
$('extended-forward-list').addEventListener('click',async e=>{const edit=e.target.closest('[data-ext-forward-edit]'),del=e.target.closest('[data-ext-forward-delete]');if(edit){const f=forwards.find(x=>x.id===edit.dataset.extForwardEdit);if(!f)return;editing=f.id;$('extended-forward-public').value=f.public_ip;$('extended-forward-public-port').value=f.public_port;$('extended-forward-target').value=f.target_ip;$('extended-forward-target-port').value=f.target_port;$('extended-forward-protocol').value=f.protocol;const custom=servicePolicy.mode==='custom'||!servicePolicy.services.includes(f.service);$('forward-service-select').value=custom?'__other__':(f.service||'');$('forward-service-custom').value=custom?(f.service||''):'';$('forward-service-confirmation').value='';confirmation.setCustomValidity('');syncService();$('extended-forward-restrict').checked=Boolean(f.allowed_sources?.length);$('extended-forward-sources').value=(f.allowed_sources||[]).join(', ');syncSources();$('extended-forward-submit').textContent='Zapisz zmiany';$('extended-forward-cancel').hidden=false;operationStatus('extended-forward-status','Edytujesz przekierowanie.','working');$('extended-forward-form').scrollIntoView({behavior:'smooth',block:'center'});return;}if(!del||!confirm('Usunąć przekierowanie?'))return;try{const r=await fetch(appUrl('/api/extended/forwardings/delete'),{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({id:del.dataset.extForwardDelete})});const d=await r.json();if(!r.ok)throw new Error(d.error);if(editing===del.dataset.extForwardDelete)reset();await loadForwards();}catch(err){operationStatus('extended-forward-status',err.message,'error');}});
loadForwards().catch(err=>operationStatus('extended-forward-status',err.message,'error'));
}
if(page==='server' && $('extended-listen-form')){
@@ -1727,7 +1744,7 @@
$('network-trace-results')?.setAttribute('hidden','');
operationStatus('network-trace-status',t('trace.running','Running ping and traceroute… This can take up to a minute.'),'working');
try{
const r=await fetch('/api/network/trace',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({target:value,geolocate:!!geo?.checked,language:window.WGToolsI18n?.getLanguage?.()||'en'})});
const r=await fetch('/api/network/trace',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({target:value,geolocate:!!geo?.checked,language:'pl'})});
const d=await r.json(); if(!r.ok)throw new Error(d.error||t('trace.failed','Network trace failed'));
renderNetworkTrace(d);
let message=t('trace.done','Network trace completed.'); if(d.geo_partial)message+=` ${t('trace.partial_geo','Some public hops could not be geolocated.')}`;
@@ -1864,7 +1881,7 @@
function formatDate(ts){
const n=Number(ts||0); if(!n)return t('settings.never_logged_in','Never');
try{return new Intl.DateTimeFormat(window.WGToolsI18n?.getLanguage?.()==='ru'?'ru-RU':'en-GB',{dateStyle:'medium',timeStyle:'short'}).format(new Date(n*1000));}
try{return new Intl.DateTimeFormat('pl-PL',{dateStyle:'medium',timeStyle:'short'}).format(new Date(n*1000));}
catch(_){return new Date(n*1000).toLocaleString();}
}
@@ -2042,6 +2059,12 @@
}
function bindUserManagement(){
if($('service-policy-form')){
const sync=()=>{$('service-policy-options').hidden=!$('service-policy-enabled').checked;$('service-policy-list-wrap').hidden=$('service-policy-mode').value==='custom';};
$('service-policy-enabled').addEventListener('change',sync);$('service-policy-mode').addEventListener('change',sync);
fetch(appUrl('/api/service-policy')).then(r=>r.json()).then(d=>{if(!d.ok)throw new Error(d.error);$('service-policy-enabled').checked=d.policy.enabled;$('service-policy-mode').value=d.policy.mode;$('service-policy-list').value=d.policy.services.join('\n');sync();}).catch(e=>operationStatus('service-policy-status',e.message,'error'));
$('service-policy-form').addEventListener('submit',async e=>{e.preventDefault();try{const r=await fetch(appUrl('/api/service-policy'),{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({enabled:$('service-policy-enabled').checked,mode:$('service-policy-mode').value,services:$('service-policy-list').value.split(/\r?\n/).map(x=>x.trim()).filter(Boolean)})});const d=await r.json();if(!r.ok)throw new Error(d.error);operationStatus('service-policy-status','Zapisano ustawienia usług.','success');}catch(err){operationStatus('service-policy-status',err.message,'error');}});
}
$('branding-form')?.addEventListener('submit', async e=>{
e.preventDefault();
try {
@@ -2529,7 +2552,7 @@
const ids=$('telegram-allowed-ids'); if(ids)ids.value=(data?.allowed_user_ids||[]).join('\n');
const endpoint=$('telegram-endpoint'); if(endpoint)endpoint.value=data?.default_endpoint||'';
const dns=$('telegram-dns'); if(dns)dns.value=(data?.default_dns||[]).join(', ');
const language=$('telegram-language'); if(language)language.value=data?.language||'auto';
const language=$('telegram-language'); if(language)language.value='pl';
const remove=$('telegram-remove-token-button'); if(remove)remove.disabled=!data?.token_configured;
const botName=$('telegram-bot-name'); if(botName)botName.textContent=data?.bot_username?`@${data.bot_username}`:t('settings.telegram_not_configured','Not configured');
const last=$('telegram-last-poll'); if(last)last.textContent=`${t('settings.telegram_last_poll','Last Telegram contact')}: ${data?.last_poll_at?formatDate(data.last_poll_at):'—'}`;
+2 -2
View File
@@ -1,8 +1,8 @@
window.WGToolsI18n = (() => {
const boot = window.WGTOOLS_I18N || {};
const messages = boot.messages || {};
const lang = boot.language || 'en';
const supported = ['en','ru','de','fr','it','es','pl'];
const lang = 'pl';
const supported = ['pl'];
function t(key, fallback = key) { return messages[key] || fallback; }
function getLanguage() { return lang; }
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
-1101
View File
File diff suppressed because it is too large. Load diff
+98 -160
View File
@@ -31,156 +31,96 @@ from app.core.telegram_config import (
PENDING: dict[int, dict[str, Any]] = {}
SELECTED_INTERFACES: dict[int, str] = {}
BOT_TEXT = {
"en": {
"audit": "🧾 Audit",
"audit_title": "🧾 Audit history",
"audit_empty": "No audit entries yet.",
"audit_older": "➡️",
"audit_newer": "⬅️",
"audit_footer": "Records are kept for 30 days.",
"audit_bad_cursor": "Audit page is unavailable. Open the latest records.",
"interface": "🧩 Interface",
"server": "⚙ Server",
"server_controls": "WireGuard server · {interface}\nChoose an action:",
"choose_interface": "Choose the WireGuard interface to manage:",
"interface_selected": "Interface selected: {name}",
"welcome": "WGTools Telegram control is ready. Choose an action:",
"private_only": "For security, WGTools works only in a private chat with the bot.",
"denied": "Access denied. Your Telegram user ID is: {user_id}\nAdd this ID in WGTools → Settings → Telegram Bot.",
"menu": "Main menu",
"status": "📊 Server status",
"clients": "👥 Clients",
"create": "➕ Create client",
"delete": "➖ Delete client",
"configs": "📄 Configs",
"choose_config": "Choose a client. 📄 = configuration available, 🔒 = an older peer whose private key is not stored by WGTools.",
"no_configs": "No clients configured.",
"legacy_config_unavailable": "🔒 WGTools cannot recreate this older client configuration because the server does not have the client's private key. Only clients created by WGTools can be reissued as .conf/QR.",
"sending_config": "Preparing configuration for {name}…",
"config_sent": "✅ Configuration sent: {name}",
"start": "Start",
"restart": "Restart",
"stop": "Stop",
"cancel": "Cancel",
"back": "⬅️ Menu",
"running": "Running",
"stopped": "Stopped",
"online": "online",
"offline": "offline",
"blocked_schedule": "blocked by schedule",
"blocked_expired": "expired / blocked",
"never": "never",
"status_body": "🛡 WireGuard: {state}\nInterface: {interface}\nVPN address: {address}\nPort: {port}\nPeers: {online}/{total} online\nCPU: {cpu}%\nRAM: {memory}%\nNetwork: ↓ {rx}/s · ↑ {tx}/s\nUptime: {uptime}",
"clients_title": "👥 Clients ({total})",
"no_clients": "No clients configured.",
"choose_create_group": "Choose a group for the new client, or continue without a group:",
"create_no_group": "Without group",
"create_name": "Send a name for the new peer. Send /cancel to stop.",
"create_endpoint": "The public server address/domain is not configured. Send it now (for example vpn.example.com). It will be saved as the default. Send /cancel to stop.",
"creating": "Creating client…",
"created": "✅ Client created\nName: {name}{group_line}\nVPN address: {address}\nRoutes: {routes}\nEndpoint: {endpoint}",
"config_unavailable": "The peer was created, but a client configuration could not be generated: {error}",
"choose_delete": "Choose the client to delete:",
"confirm_delete": "Delete peer “{name}” ({address})? A backup of the selected WireGuard interface configuration will be created first.",
"deleted": "✅ Client deleted: {name}",
"deleting": "Deleting client…",
"already_deleted": "ℹ️ Client is already deleted.",
"working": "Working…",
"confirm_stop": "Stop WireGuard? Active VPN clients will be disconnected.",
"confirm_restart": "Restart WireGuard? Active clients will reconnect automatically.",
"started": "✅ WireGuard started.",
"stopped_ok": "✅ WireGuard stopped.",
"restarted": "✅ WireGuard restarted.",
"yes": "Yes",
"no": "No",
"cancelled": "Cancelled.",
"error": "⚠️ {error}",
"unknown": "Use the buttons or /menu.",
"endpoint_saved": "Server address saved: {endpoint}",
"managed_conf": "Client configuration",
},
"ru": {
"audit": "🧾 Аудит",
"audit_title": "🧾 История аудита",
"audit_empty": "Записей аудита пока нет.",
"audit_older": "➡️",
"audit_newer": "⬅️",
"audit_footer": "Срок хранения записей — 30 дней.",
"audit_bad_cursor": "Страница аудита недоступна. Откройте последние записи.",
"interface": "🧩 Интерфейс",
"server": "⚙ Сервер",
"server_controls": "Сервер WireGuard · {interface}\nВыберите действие:",
"choose_interface": "Выберите интерфейс WireGuard для управления:",
"interface_selected": "Выбран интерфейс: {name}",
"welcome": "WGTools Telegram готов к работе. Выберите действие:",
"private_only": "Для безопасности WGTools работает только в личном чате с ботом.",
"denied": "Доступ запрещён. Ваш Telegram user ID: {user_id}\nДобавьте этот ID в WGTools → Настройки → Telegram Bot.",
"menu": "Главное меню",
"status": "📊 Состояние сервера",
"clients": "👥 Клиенты",
"create": "➕ Создать клиента",
"delete": "➖ Удалить клиента",
"configs": "📄 Конфиги",
"choose_config": "Выберите клиента. 📄 — конфиг доступен, 🔒 — старый peer, приватный ключ которого не хранится в WGTools.",
"no_configs": "Клиенты не настроены.",
"legacy_config_unavailable": "🔒 WGTools не может заново собрать конфигурацию этого старого клиента: на сервере нет его приватного ключа. Повторно выдавать .conf/QR можно только для клиентов, созданных WGTools.",
"sending_config": "Готовлю конфигурацию для {name}…",
"config_sent": "✅ Конфигурация отправлена: {name}",
"start": "Пуск",
"restart": "Перезапуск",
"stop": "Стоп",
"cancel": "Отмена",
"back": "⬅️ Меню",
"running": "Работает",
"stopped": "Остановлен",
"online": "онлайн",
"offline": "офлайн",
"blocked_schedule": "заблокирован расписанием",
"blocked_expired": "срок истёк / заблокирован",
"never": "никогда",
"status_body": "🛡 WireGuard: {state}\nИнтерфейс: {interface}\nVPN-адрес: {address}\nПорт: {port}\nКлиенты: {online}/{total} онлайн\nCPU: {cpu}%\nRAM: {memory}%\nСеть: ↓ {rx}/с · ↑ {tx}/с\nUptime: {uptime}",
"clients_title": "👥 Клиенты ({total})",
"no_clients": "Клиенты не настроены.",
"choose_create_group": "Выберите группу для нового клиента или продолжите без группы:",
"create_no_group": "Без группы",
"create_name": "Отправьте имя нового peer. Для отмены отправьте /cancel.",
"create_endpoint": "Публичный адрес/домен сервера не настроен. Отправьте его сейчас (например vpn.example.com). Он будет сохранён как адрес по умолчанию. Для отмены отправьте /cancel.",
"creating": "Создаю клиента…",
"created": "✅ Клиент создан\nИмя: {name}{group_line}\nVPN-адрес: {address}\nМаршруты: {routes}\nEndpoint: {endpoint}",
"config_unavailable": "Peer создан, но готовый клиентский конфиг получить не удалось: {error}",
"choose_delete": "Выберите клиента для удаления:",
"confirm_delete": "Удалить peer «{name}» ({address})? Перед изменением будет создана резервная копия конфигурации выбранного WireGuard-интерфейса.",
"deleted": "✅ Клиент удалён: {name}",
"deleting": "Удаляю клиента…",
"already_deleted": "ℹ️ Клиент уже удалён.",
"working": "Выполняю…",
"confirm_stop": "Остановить WireGuard? Активные VPN-клиенты будут отключены.",
"confirm_restart": "Перезапустить WireGuard? Активные клиенты подключатся снова автоматически.",
"started": "✅ WireGuard запущен.",
"stopped_ok": "✅ WireGuard остановлен.",
"restarted": "✅ WireGuard перезапущен.",
"yes": "Да",
"no": "Нет",
"cancelled": "Отменено.",
"error": "⚠️ {error}",
"unknown": "Используйте кнопки или команду /menu.",
"endpoint_saved": "Адрес сервера сохранён: {endpoint}",
"managed_conf": "Конфигурация клиента",
},
}
BOT_TEXT = {"pl": {'audit': '🧾 Audyt',
'audit_title': '🧾 Historia audytu',
'audit_empty': 'Brak wpisów audytu.',
'audit_older': '➡️',
'audit_newer': '⬅️',
'audit_footer': 'Wpisy są przechowywane przez 30 dni.',
'audit_bad_cursor': 'Ta strona audytu jest niedostępna. Otwórz najnowsze wpisy.',
'interface': '🧩 Interfejs',
'server': '⚙ Serwer',
'server_controls': 'Serwer WireGuard · {interface}\nWybierz działanie:',
'choose_interface': 'Wybierz interfejs WireGuard:',
'interface_selected': 'Wybrano interfejs: {name}',
'welcome': 'Sterowanie Telegram jest gotowe. Wybierz działanie:',
'private_only': 'Ze względów bezpieczeństwa bot działa tylko w prywatnej rozmowie.',
'denied': 'Brak dostępu. Twój identyfikator Telegram: {user_id}\nDodaj go w ustawieniach bota Telegram.',
'menu': 'Menu główne',
'status': '📊 Stan serwera',
'clients': '👥 Klienci',
'create': '➕ Dodaj klienta',
'delete': '➖ Usuń klienta',
'configs': '📄 Konfiguracje',
'choose_config': 'Wybierz klienta. 📄 = konfiguracja dostępna, 🔒 = starszy klient bez zapisanego klucza '
'prywatnego.',
'no_configs': 'Brak skonfigurowanych klientów.',
'legacy_config_unavailable': '🔒 Nie można odtworzyć konfiguracji starszego klienta bez jego klucza '
'prywatnego. Plik .conf i kod QR można wydać ponownie tylko dla klientów '
'utworzonych w panelu.',
'sending_config': 'Przygotowywanie konfiguracji: {name}…',
'config_sent': '✅ Wysłano konfigurację: {name}',
'start': 'Uruchom',
'restart': 'Uruchom ponownie',
'stop': 'Zatrzymaj',
'cancel': 'Anuluj',
'back': '⬅️ Menu',
'running': 'Działa',
'stopped': 'Zatrzymany',
'online': 'online',
'offline': 'offline',
'blocked_schedule': 'zablokowany przez harmonogram',
'blocked_expired': 'wygasł / zablokowany',
'never': 'nigdy',
'status_body': '🛡 WireGuard: {state}\n'
'Interfejs: {interface}\n'
'Adres VPN: {address}\n'
'Port: {port}\n'
'Klienci: {online}/{total} online\n'
'CPU: {cpu}%\n'
'RAM: {memory}%\n'
'Sieć: ↓ {rx}/s · ↑ {tx}/s\n'
'Czas pracy: {uptime}',
'clients_title': '👥 Klienci ({total})',
'no_clients': 'Brak skonfigurowanych klientów.',
'choose_create_group': 'Wybierz grupę dla nowego klienta lub kontynuuj bez grupy:',
'create_no_group': 'Bez grupy',
'create_name': 'Wyślij nazwę nowego klienta. Aby anulować, wyślij /cancel.',
'create_endpoint': 'Brak publicznego adresu serwera. Wyślij adres lub domenę (np. vpn.example.com), aby '
'zapisać ją jako domyślną. Aby anulować, wyślij /cancel.',
'creating': 'Tworzenie klienta…',
'created': '✅ Utworzono klienta\n'
'Nazwa: {name}{group_line}\n'
'Adres VPN: {address}\n'
'Trasy: {routes}\n'
'Adres serwera: {endpoint}',
'config_unavailable': 'Utworzono klienta, ale nie udało się wygenerować konfiguracji: {error}',
'choose_delete': 'Wybierz klienta do usunięcia:',
'confirm_delete': 'Usunąć klienta „{name}” ({address})? Najpierw powstanie kopia konfiguracji interfejsu.',
'deleted': '✅ Usunięto klienta: {name}',
'deleting': 'Usuwanie klienta…',
'already_deleted': 'ℹ️ Klient został już usunięty.',
'working': 'Trwa wykonywanie…',
'confirm_stop': 'Zatrzymać WireGuard? Aktywni klienci VPN zostaną rozłączeni.',
'confirm_restart': 'Uruchomić ponownie WireGuard? Aktywni klienci połączą się ponownie.',
'started': '✅ Uruchomiono WireGuard.',
'stopped_ok': '✅ Zatrzymano WireGuard.',
'restarted': '✅ Uruchomiono ponownie WireGuard.',
'yes': 'Tak',
'no': 'Nie',
'cancelled': 'Anulowano.',
'error': '⚠️ {error}',
'unknown': 'Użyj przycisków lub polecenia /menu.',
'endpoint_saved': 'Zapisano adres serwera: {endpoint}',
'managed_conf': 'Konfiguracja klienta'}}
def lang_for(user: dict[str, Any] | None, settings: dict[str, Any]) -> str:
configured = str(settings.get("language") or "auto")
if configured in {"en", "ru"}:
return configured
code = str((user or {}).get("language_code") or "").lower()
return "ru" if code.startswith("ru") else "en"
return "pl"
def tr(lang: str, key: str, **kwargs: Any) -> str:
text = BOT_TEXT.get(lang, BOT_TEXT["en"]).get(key, BOT_TEXT["en"].get(key, key))
text = BOT_TEXT["pl"].get(key, key)
try:
return text.format(**kwargs)
except Exception:
@@ -607,20 +547,18 @@ def clients_text(lang: str, user_id: int) -> str:
# Human-friendly event labels; unknown event types remain readable as identifiers.
AUDIT_ACTIONS = {
"client.created": ("Client created", "Клиент создан"),
"client.deleted": ("Client deleted", "Клиент удалён"),
"client.updated": ("Client updated", "Клиент изменён"),
"client.config_viewed": ("Client configuration opened", "Конфигурация открыта"),
"wireguard.client_connected": ("Client connected", "Клиент подключился"),
"wireguard.started": ("WireGuard started", "WireGuard запущен"),
"wireguard.stopped": ("WireGuard stopped", "WireGuard остановлен"),
"wireguard.restarted": ("WireGuard restarted", "WireGuard перезапущен"),
"auth.login": ("User signed in", "Вход пользователя"),
"auth.login_failed": ("Login failed", "Ошибка входа"),
"telegram.action_failed": ("Telegram action failed", "Ошибка команды Telegram"),
"telegram.action_denied": ("Telegram action denied", "Действие Telegram запрещено"),
}
AUDIT_ACTIONS = {'client.created': 'Utworzono klienta',
'client.deleted': 'Usunięto klienta',
'client.updated': 'Zmieniono klienta',
'client.config_viewed': 'Otworzono konfigurację klienta',
'wireguard.client_connected': 'Klient połączył się',
'wireguard.started': 'Uruchomiono WireGuard',
'wireguard.stopped': 'Zatrzymano WireGuard',
'wireguard.restarted': 'Uruchomiono ponownie WireGuard',
'auth.login': 'Logowanie użytkownika',
'auth.login_failed': 'Nieudane logowanie',
'telegram.action_failed': 'Błąd polecenia Telegram',
'telegram.action_denied': 'Odmowa polecenia Telegram'}
AUDIT_ICONS = {
@@ -655,7 +593,7 @@ def audit_screen(lang: str, page: dict[str, Any]) -> tuple[str, dict[str, Any]]:
for item in items:
date = time.strftime("%d.%m %H:%M", time.localtime(int(item.get("created_at") or 0)))
event = str(item.get("action") or "event")
label = AUDIT_ACTIONS.get(event, (event.replace(".", " / "), event.replace(".", " / ")))[0 if lang == "en" else 1]
label = AUDIT_ACTIONS.get(event, event.replace(".", " / "))
actor = _audit_html(item.get("username") or "system", 40)
target = _audit_html(item.get("object"), 56)
outcome_raw = " ".join(str(item.get("result") or "").split())
@@ -935,7 +873,7 @@ def finish_create(
},
)
public_key = str(result.get("public_key") or "")
group_line = f"\nGroup: {group.get('name')}" if group and lang == "en" else (f"\nГруппа: {group.get('name')}" if group else "")
group_line = f"\nGrupa: {group.get('name')}" if group else ""
created_text = tr(
lang,
"created",
-8
View File
@@ -16,14 +16,6 @@
const sidebarCollapsed = localStorage.getItem('wgtools.sidebar.collapsed') === '1';
if (sidebarCollapsed) document.documentElement.classList.add('sidebar-pref-collapsed');
const savedLanguage = localStorage.getItem('wgtools.language');
const cookieMatch = document.cookie.match(/(?:^|;\s*)wgtools_language=([^;]+)/);
const cookieLanguage = cookieMatch ? decodeURIComponent(cookieMatch[1]) : '';
if (['en','ru','de','fr','it','es','pl'].includes(savedLanguage) && savedLanguage !== cookieLanguage) {
document.documentElement.style.visibility = 'hidden';
document.cookie = `wgtools_language=${encodeURIComponent(savedLanguage)}; Path=/; Max-Age=31536000; SameSite=Lax`;
location.reload();
}
} catch (_) {}
})();
</script>
+14 -2
View File
@@ -21,8 +21,20 @@
<label><span>Port klienta</span><input id="extended-forward-target-port" type="number" min="1" max="65535" required></label>
<label><span>Protokół</span><select id="extended-forward-protocol"><option value="tcp">TCP</option><option value="udp">UDP</option><option value="both">TCP i UDP</option></select></label>
</div>
<label class="check-label"><input id="extended-forward-restrict" type="checkbox"><span>Ogranicz dostęp do wybranych adresów IP</span></label>
<label id="extended-forward-sources-wrap" hidden><span>Dozwolone adresy IPv4, oddzielone przecinkami</span><input id="extended-forward-sources" placeholder="89.144.32.110, 89.144.32.172"><small>Pozostałe adresy nie uzyskają dostępu do tego przekierowania.</small></label>
<label class="check-label forward-restrict"><input id="extended-forward-restrict" type="checkbox"><span>Ogranicz dostęp do wybranych adresów IP</span></label>
<label id="extended-forward-sources-wrap" class="field-block" hidden><span>Dozwolone adresy IPv4, oddzielone przecinkami</span><input id="extended-forward-sources" placeholder="89.144.32.110, 89.144.32.172"><small>Pozostałe adresy nie uzyskają dostępu do tego przekierowania.</small></label>
<div id="forward-service-section" hidden>
<h3 class="forward-section-title">Opis usługi</h3>
<div class="setup-grid section-space-small">
<label id="forward-service-select-wrap"><span>Opis usługi (wymagane)</span><select id="forward-service-select"></select><small>Wybierz usługę z listy lub, jeśli dostępna, opcję „Inna”.</small></label>
<label id="forward-service-custom-wrap"><span>Nazwa usługi (wymagane)</span><input id="forward-service-custom" maxlength="120" placeholder="Np. serwer gry"></label>
</div>
<div class="forward-warning"><b>Co udostępniasz publicznie?</b><p>Opisz oprogramowanie lub serwer gry, który udostępniasz.</p><p>Nie wpisuj „test” ani przypadkowych znaków. Może to spowodować wyłączenie tunelu lub zablokowanie konta.</p></div>
<h3 class="forward-section-title">Potwierdzenie odpowiedzialności</h3>
<div class="forward-warning"><b>Korzystaj odpowiedzialnie</b><p>{{ branding.name or 'Panel' }}: usług nie wolno używać do złośliwego oprogramowania, phishingu, spamu, nieuprawnionego dostępu ani innych zabronionych działań. Niektóre programy są zabronione niezależnie od intencji, także w celach edukacyjnych lub badawczych.</p><p>Naruszenia skutkują trwałym zawieszeniem konta i utratą prawa do zwrotu.</p><p>Aby kontynuować, przepisz dokładnie poniższe potwierdzenie.</p></div>
<div class="forward-confirmation-example" id="forward-confirmation-example">Nie będę używać tego tunelu do złośliwego oprogramowania, nadużyć ani niedozwolonych usług.</div>
<label class="field-block forward-confirmation-input"><span>Przepisz potwierdzenie (wymagane)</span><textarea id="forward-service-confirmation" maxlength="200" rows="3" autocomplete="off" spellcheck="false" placeholder="Wpisz tekst widoczny powyżej"></textarea></label>
</div>
<button class="btn primary" type="submit" id="extended-forward-submit">Dodaj przekierowanie</button>
<button class="btn" type="button" id="extended-forward-cancel" hidden>Anuluj edycję</button>
<div id="extended-forward-status" class="operation-status" hidden></div>
+12 -2
View File
@@ -33,12 +33,22 @@
</div>
<div class="settings-tab-panel" data-settings-tab-panel="general">
<section class="card">
<div class="card-head"><h2>Usługi w przekierowaniach portów</h2></div>
<form id="service-policy-form" class="settings-form-pad">
<label class="check-label"><input id="service-policy-enabled" type="checkbox"><span>Chcę zbierać informacje o usługach</span></label>
<div id="service-policy-options" hidden>
<div class="setup-grid section-space-small"><label><span>Sposób określania usługi</span><select id="service-policy-mode"><option value="list">Tylko lista usług</option><option value="custom">Użytkownik wpisuje usługę</option><option value="combo">Lista usług i własna nazwa</option></select></label></div>
<label class="field-block" id="service-policy-list-wrap"><span>Lista usług — każda w osobnym wierszu</span><textarea id="service-policy-list" class="controlled-textarea" rows="8" placeholder="teamspeak3&#10;udp-generic&#10;wireguard"></textarea></label>
</div>
<div class="settings-save-row"><button class="btn primary" type="submit">Zapisz ustawienia usług</button></div><div id="service-policy-status" class="operation-status" hidden></div>
</form>
</section>
<div class="two-col">
<section class="card">
<div class="card-head"><h2 data-i18n="settings.appearance">{{ tr('settings.appearance') }}</h2></div>
<div class="form-grid settings-form-pad">
<label><span data-i18n="settings.theme">{{ tr('settings.theme') }}</span><select id="theme-select"><option value="dark">{{ tr('settings.theme_dark') }}</option><option value="light">{{ tr('settings.theme_light') }}</option><option value="system">{{ tr('settings.theme_system') }}</option></select></label>
<label><span data-i18n="settings.language">{{ tr('settings.language') }}</span><select id="language-select"><option value="en">English</option><option value="ru">Русский</option><option value="de">Deutsch</option><option value="fr">Français</option><option value="it">Italiano</option><option value="es">Español</option><option value="pl">Polski</option></select></label>
<label class="check-label"><input id="sidebar-collapsed-toggle" type="checkbox"><span>{{ tr('settings.collapse_sidebar') }}</span></label>
</div>
</section>
@@ -112,7 +122,7 @@
</div>
<div class="telegram-grid">
<label><span>{{ tr('settings.telegram_token') }}</span><input id="telegram-token" type="password" maxlength="256" autocomplete="off" placeholder=""><small>{{ tr('settings.telegram_token_help') }} {{ tr('settings.telegram_token_keep') }}</small></label>
<label><span>{{ tr('settings.telegram_language') }}</span><select id="telegram-language"><option value="auto">{{ tr('settings.telegram_language_auto') }}</option><option value="en">English</option><option value="ru">Русский</option></select><small>{{ tr('settings.telegram_setup_note') }}</small></label>
<input id="telegram-language" type="hidden" value="pl">
<label><span>{{ tr('settings.telegram_endpoint') }}</span><input id="telegram-endpoint" maxlength="253" autocomplete="off" placeholder="vpn.example.com"><small>{{ tr('settings.telegram_endpoint_help') }}</small></label>
<label><span>{{ tr('settings.telegram_dns') }}</span><input id="telegram-dns" maxlength="255" autocomplete="off" placeholder="1.1.1.1, 8.8.8.8"><small>{{ tr('settings.telegram_dns_help') }}</small></label>
<label class="telegram-ids-field"><span>{{ tr('settings.telegram_allowed_ids') }}</span><textarea id="telegram-allowed-ids" class="controlled-textarea mono" rows="5" placeholder="123456789"></textarea><small>{{ tr('settings.telegram_allowed_ids_help') }}</small></label>
+10 -3
View File
@@ -4587,6 +4587,14 @@ def extended_forward_add(iface: str, payload: dict[str, Any], *, update_id: str
if not update_id and len(rows) >= 20:
raise ValueError("Osiągnięto limit przekierowań w tej sieci")
row = {"id": update_id or secrets.token_hex(8), "public_ip": public_ip, "public_port": public_port, "target_ip": target_ip, "target_port": target_port, "protocol": protocol, "device": device, "allowed_sources": sources}
if payload.get('service') and isinstance(payload.get('responsibility'), dict):
row['service'] = str(payload['service'])[:120]
row['responsibility'] = payload['responsibility']
elif update_id:
previous = next(item for item in rows if item['id'] == update_id)
for key in ('service', 'responsibility'):
if key in previous:
row[key] = previous[key]
result = _extended_write_forwards(iface, [*(item for item in rows if item['id'] != update_id), row])
return {**result, "forward": row}
@@ -5791,8 +5799,7 @@ def _validate_update_source(source_root: Path, expected_version: str) -> None:
required = [
"VERSION",
"app/main.py",
"app/locales/en.json",
"app/locales/ru.json",
"app/locales/pl.json",
"scripts/install.sh",
"scripts/uninstall.sh",
"scripts/wgtools-helper",
@@ -5811,7 +5818,7 @@ def _validate_update_source(source_root: Path, expected_version: str) -> None:
actual_version = (source_root / "VERSION").read_text(encoding="utf-8").strip()
if actual_version != expected_version:
raise RuntimeError(f"Update archive version mismatch: expected {expected_version}, got {actual_version or 'empty'}")
for locale in (source_root / "app/locales/en.json", source_root / "app/locales/ru.json"):
for locale in (source_root / "app/locales/pl.json",):
json.loads(locale.read_text(encoding="utf-8"))
for script_name in ("scripts/install.sh", "scripts/wgtools-cli"):
rc, out, err = run(["bash", "-n", str(source_root / script_name)], timeout=15)
+5 -39
View File
@@ -1,42 +1,8 @@
"""Prevent non-Russian, non-English help falling back to English again."""
from __future__ import annotations
import json
import unittest
from pathlib import Path
from app.core.help_content import HELP, get_help_sections
ROOT = Path(__file__).resolve().parents[1]
LANGUAGES = ('de', 'fr', 'it', 'es', 'pl')
class HelpTranslationTests(unittest.TestCase):
def test_all_five_help_dictionaries_loaded(self):
original = get_help_sections('en')
for language in LANGUAGES:
with self.subTest(language=language):
file = ROOT/'app/core/help_locales'/f'{language}.json'
self.assertTrue(file.is_file())
data = json.loads(file.read_text(encoding='utf8'))
self.assertEqual(data, get_help_sections(language))
self.assertEqual(len(data),len(original))
self.assertEqual([s['id'] for s in data], [s['id'] for s in original])
self.assertNotEqual(data[0]['title'], original[0]['title'])
self.assertNotEqual(data[0]['topics'][0]['paragraphs'][0],original[0]['topics'][0]['paragraphs'][0])
for section, ref_section in zip(data, original):
self.assertTrue(section['title'].strip())
self.assertTrue(section['intro'].strip())
self.assertEqual(len(section['topics']),len(ref_section['topics']))
for topic, reference in zip(section['topics'],ref_section['topics']):
self.assertTrue(topic['title'].strip())
self.assertTrue(all(x.strip() for x in topic['paragraphs']))
self.assertEqual(bool(topic['example_lines']),bool(reference['example_lines']))
self.assertEqual(bool(topic['warning']),bool(reference['warning']))
# Common technical terms such as Diagnostics can legitimately match English.
self.assertNotEqual(topic['paragraphs'][0],reference['paragraphs'][0],"untranslated help paragraph")
self.assertTrue(all(x.strip() for x in topic['bullets']))
def test_unknown_language_defaults_to_english(self):
self.assertEqual(get_help_sections('non-existent-language'), HELP['en'])
def test_version(self):
self.assertEqual((ROOT/'VERSION').read_text().strip(),'1.0.4')
if __name__ == '__main__':
unittest.main()
def test_help_is_polish():
sections = get_help_sections("pl")
assert sections and sections == HELP["pl"]
assert get_help_sections("en") == sections
assert all(section["title"] and section["topics"] for section in sections)
+8 -15
View File
@@ -15,21 +15,14 @@ LANGS = ('en', 'ru', 'de', 'fr', 'it', 'es', 'pl')
class CandidateTests(unittest.TestCase):
def test_versions_and_locale_fallback_contract(self):
self.assertEqual((ROOT / 'VERSION').read_text().strip(), '1.0.4')
en = json.loads((ROOT/'app/locales/en.json').read_text())
self.assertGreaterEqual(len(en), 1098)
for lang in LANGS:
content=(ROOT/'app/locales'/f'{lang}.json').read_bytes()
self.assertEqual(content,(ROOT/'app/static'/f'{lang}.json').read_bytes())
self.assertEqual(content,(ROOT/'app/static/locales'/f'{lang}.json').read_bytes())
data=json.loads(content)
self.assertEqual(set(data),set(en),lang)
# Every supported language resolves every possible UI key through English.
merged={**en,**data}
self.assertEqual(set(merged),set(en))
for key,value in data.items():
self.assertEqual(set(re.findall(r'\{\w+\}',value)),
set(re.findall(r'\{\w+\}',en[key])),(lang,key))
self.assertEqual((ROOT / 'VERSION').read_text().strip(), '1.0.7')
content = (ROOT / 'app/locales/pl.json').read_bytes()
self.assertEqual(content, (ROOT / 'app/static/pl.json').read_bytes())
self.assertEqual(content, (ROOT / 'app/static/locales/pl.json').read_bytes())
self.assertGreaterEqual(len(json.loads(content)), 1098)
# Poprzedni aktualizator wymaga tych plików podczas instalacji pakietu.
for old in ('en', 'ru'):
self.assertEqual(json.loads((ROOT / 'app/locales' / f'{old}.json').read_text()), {})
def test_delete_returns_exact_client_name_for_audit(self):
helper=runpy.run_path(str(ROOT/'scripts/wgtools-helper'))
+2 -2
View File
@@ -40,7 +40,7 @@ class Release405Tests(unittest.TestCase):
self.assertEqual([x["id"] for x in newer["items"]], [x["id"] for x in older["items"]])
self.assertNotIn("details", older["items"][0])
text, keyboard = telegram_bot.audit_screen("ru", recent)
self.assertIn("аудита", text)
self.assertIn("audytu", text)
self.assertIn("peer-44", text)
self.assertTrue(any(btn.get("callback_data", "").startswith("audit:before") for row in keyboard["inline_keyboard"] for btn in row))
@@ -88,7 +88,7 @@ class Release405Tests(unittest.TestCase):
with patch.object(telegram_bot, "send_message", lambda *a, **kw: sent.append(a[2])), patch.object(telegram_bot,"answer_callback"):
telegram_bot.handle_update(event, {"language":"en", "allowed_user_ids":[]}, "token")
self.assertEqual(len(sent), 1)
self.assertIn("Access denied", sent[0])
self.assertIn("Brak dostępu", sent[0])
def test_theme_and_audit_global_modal(self):
root = Path(__file__).resolve().parents[1]
+25
View File
@@ -0,0 +1,25 @@
import pytest
from app.core import preferences
from app import main
def test_service_policy_and_validation(tmp_path, monkeypatch):
monkeypatch.setattr(preferences, 'DATABASE_PATH', str(tmp_path / 'settings.db'))
monkeypatch.setattr(main, 'audit_username', lambda request: 'jan')
assert not preferences.get_service_policy()['enabled']
with pytest.raises(ValueError):
preferences.update_service_policy(True, 'list', [])
preferences.update_service_policy(True, 'list', ['WireGuard', 'WireGuard'])
request = main.ExtendedForwardRequest(public_ip='192.0.2.1', public_port=80, target_ip='10.0.0.2', target_port=80, protocol='tcp', service='WireGuard')
with pytest.raises(ValueError):
main.forward_payload(request, None)
request.confirmation = main.SERVICE_CONFIRMATION
result = main.forward_payload(request, None)
assert result['responsibility']['user'] == 'jan'
request.service = 'inny'
with pytest.raises(ValueError):
main.forward_payload(request, None)
preferences.update_service_policy(True, 'combo', ['WireGuard'])
assert main.forward_payload(request, None)['service'] == 'inny'
preferences.update_service_policy(True, 'custom', [])
assert main.forward_payload(request, None)['service'] == 'inny'
+3 -3
View File
@@ -24,7 +24,7 @@ class AuditPresentationTests(unittest.TestCase):
def test_menu_label_and_clean_arrows(self):
menu = bot.main_keyboard("ru", 42)["inline_keyboard"]
audit_button = next(btn for row in menu for btn in row if btn["callback_data"] == "audit:latest")
self.assertEqual(audit_button["text"], "🧾 Аудит")
self.assertEqual(audit_button["text"], "🧾 Audyt")
for i in range(45):
audit.write_audit("admin", "client.created", object=f"wg0 · test-{i}", result="created")
newest = audit.list_audit_page(limit=20)
@@ -33,11 +33,11 @@ class AuditPresentationTests(unittest.TestCase):
self.assertIn("<code>", newest_text)
self.assertIn("test-44", newest_text)
self.assertEqual(len(newest["items"]), 20)
self.assertEqual([b["text"] for row in newest_kb["inline_keyboard"] for b in row], ["➡️", "⬅️ Меню"])
self.assertEqual([b["text"] for row in newest_kb["inline_keyboard"] for b in row], ["➡️", "⬅️ Menu"])
self.assertTrue(all(b["callback_data"] != "audit:latest" for row in newest_kb["inline_keyboard"] for b in row))
old = audit.list_audit_page(before_id=newest["items"][-1]["id"])
old_txt, old_kb = bot.audit_screen("ru", old)
self.assertEqual([b["text"] for row in old_kb["inline_keyboard"] for b in row], ["⬅️", "➡️", "⬅️ Меню"])
self.assertEqual([b["text"] for row in old_kb["inline_keyboard"] for b in row], ["⬅️", "➡️", "⬅️ Menu"])
self.assertEqual(old_kb["inline_keyboard"][0][0]["callback_data"], f"audit:after:{old['items'][0]['id']}")
self.assertEqual(old_kb["inline_keyboard"][0][1]["callback_data"], f"audit:before:{old['items'][-1]['id']}")
self.assertLess(len(old_txt), 4096)