504 Commits
Author SHA1 Message Date
Максимов Владимир Сергеевич bd2e302ac9 Fixed
Removed a reference to a non-existent `data_manager`.
Key validation now uses the existing `DATA_LOCK`, and the SSH check is performed in a separate thread.
Server editing and deletion operations have been synchronized using the same lock.
Added a test for the actual handler: validation returns HTTP 200, and the key is correctly saved to the trust file. The mock object that masked an error in previous tests has been removed.
v1.7.9
2026-10-22 18:15:36 +03:00
Public relations & Virtual technology 97c779265b Update SSH_HOST_KEYS.md v1.7.8 2026-10-22 15:15:44 +03:00
Максимов Владимир Сергеевич 297e7d702e 1.7.8 2026-10-22 15:13:25 +03:00
Public relations & Virtual technology 5c56897015 v1.7.8 2026-10-22 13:27:03 +03:00
Public relations & Virtual technology 33facdfc46 Merge pull request #225 from leonidorlov-hash/fix/bwlimits-stopped-container-test
test(fixtures): store all fake_ssh uploads so the stopped-container bw-limits test passes
2026-10-22 13:23:56 +03:00
Public relations & Virtual technology 55b4c2994e Merge pull request #224 from leonidorlov-hash/feat/rknblock-marketplace
feat: RKN/VK network blocking (C24Be lists) as a marketplace app
2026-10-22 13:22:53 +03:00
leonidorlov-hash 30cd112de0 test(fixtures): store all fake_ssh uploads so stopped-container bw-limits path is reachable
Upstream v1.7.7 test_stopped_container_is_not_reported_as_applied fails on
clean v1.7.7: fake_ssh only stored /clientsTable uploads, so the docker cp
of /tmp/_amnz_bwlimits raised KeyError before the deferred RuntimeError.
2026-10-20 11:29:09 +03:00
leonidorlov-hash 628dcc93f2 test(fixtures): store all fake_ssh uploads so stopped-container bw-limits path is reachable
Upstream v1.7.7 test_stopped_container_is_not_reported_as_applied fails on
clean v1.7.7: fake_ssh only stored /clientsTable uploads, so the docker cp
of /tmp/_amnz_bwlimits raised KeyError before the deferred RuntimeError.
2026-10-20 11:24:36 +03:00
leonidorlov-hash ff50dbec47 vendor rknblock scripts into the panel repo (scripts/rknblock/)
- contour scripts + systemd units live in scripts/rknblock/ now
- install-rkn-extra.sh fetches them straight from PRVTPRO raw URLs
  (no external repo, no git-clone dependency on hosts)
- app.py: RKN_RAW_BASE points at this repo's raw main
2026-10-20 00:55:51 +03:00
leonidorlov-hash a1a6a70426 ui(rknblock): 2x2 action grid, drop base-updated line; .server-icon white color 2026-10-20 00:55:51 +03:00
leonidorlov-hash 341876016a feat(rknblock): per-direction options, base-updated stamp, rainbow icon
- new card button 'Options' + modal with 4 flags: block/log inbound/outbound
- new endpoint POST /api/servers/{id}/rknblock/options driving the blocker
  'set' subcommand; record merge in install/enable keeps flags across toggles
- status probe head 6 -> 10; parser reads 'flags:' line and 'last_update:'
- card summary shows base update time and disabled directions
- _rkn_run_cmd now refreshes the host-side script copy before running
- icon shield -> rainbow in card and marketplace app list
- translations: 14 new keys x 5 languages
2026-10-20 00:55:51 +03:00
leonidorlov-hash 4a74e2127f feat(rknblock): install from marketplace runs the shared progress log
Clicking Install no longer drops back to the page with a bare toast:
the shared installModal opens in progress-only mode (form hidden) with
the progress bar and a running step log (download scripts -> ipset sets
-> firewall rules -> scan agent), finishing with the green Done state
exactly like protocol installs.
2026-10-20 00:55:51 +03:00
leonidorlov-hash b69a2ae6fc feat(rknblock): red scan-alert badge opens a full scans popup
The alert badge in the card now stands out with a red fill and a
'details' label; clicking it opens a large modal with the per-org and
per-port breakdown, direction totals and the recent-event table (all
previously dumped inline into the card). The card itself keeps only the
short agent/lists summary; the clear-statistics button moved into the
modal footer.
2026-10-20 00:55:51 +03:00
leonidorlov-hash 044e9215d5 fix(rknblock): never let a render failure escape loadRknBlock
loadRknBlock runs during page init; a throw from the card renderer
cascaded into the rest of the server page (instances vanished from
view together with the 'esc is not defined' toast on FINN).
2026-10-20 00:55:51 +03:00
leonidorlov-hash 4550a73d98 fix(rknblock): renderRknBlockCard used undefined esc(), breaking the server page
esc() only exists as a local helper inside two unrelated functions;
renderRknBlockCard calling it threw ReferenceError as soon as the card
rendered an installed app with scan data. Thrown mid-init it broke the
page chain (instances vanished from view) and every rknblock action
toast showed 'esc is not defined'. Use the global escapeHtml.
2026-10-20 00:55:51 +03:00
leonidorlov-hash 2105cc43ae fix(rknblock): marketplace Install button runs the host-level installer
The card called installFromMarketplace('rknblock'), which opened the AWG
instance installer (port/MTU/DNS/I1-I5) - none of that applies to a
host-level ipset agent with no container and no listening port. Install
now calls installRknBlock() directly (POST /rknblock/install), like the
server-page card does.
2026-10-20 00:55:51 +03:00
leonidorlov-hash 008e9fa260 feat(rknblock): RKN/VK blocking as a marketplace app with lifecycle buttons
Replace the raw rkn_block_enabled toggle with a full marketplace app:
- install/uninstall/enable/update endpoints; uninstall fully removes the
  contour (rules, ipset sets, units, scripts, configs) via a fresh
  rkn-extra-block copy so old servers can always be cleaned
- server page card with Start/Stop/Delete/Update buttons, scan count in
  the badge row, stats detail in the card info
- servers-overview scan alert now anchors to the marketplace card
- legacy rkn_block_enabled flag dropped in load_data; rkn_scans response
  gains installed/enabled
- amnezia-blocker repo gains 'rkn-extra-block uninstall' (e7514a9)
2026-10-20 00:55:51 +03:00
Public relations & Virtual technology 6236bf927b Update version v1.7.7 v1.7.7 2026-10-19 15:13:17 +03:00
Public relations & Virtual technology e2457e0058 Merge pull request #222 from Cr0Nos/fix/ssh-trusted-host-keys
fix(ssh): verify managed server host keys against trusted stores
2026-10-19 15:11:44 +03:00
Public relations & Virtual technology 9bd1183adc Merge pull request #221 from Cr0Nos/fix/clients-table-atomic-writes
fix(clients): atomically replace clientsTable with checked private staging
2026-10-19 15:06:24 +03:00
Public relations & Virtual technology 3fb7b7318e Merge pull request #220 from Cr0Nos/fix/clients-table-read-failures
fix(clients): fail closed on unverified clientsTable reads
2026-10-19 15:05:51 +03:00
Public relations & Virtual technology 22d3d58684 Merge pull request #219 from leonidorlov-hash/feat/server-ipv6-header
Show global IPv6 addresses in the server page header
2026-10-19 15:04:59 +03:00
Public relations & Virtual technology fc68c943e6 Merge pull request #218 from Cr0Nos/feat/connection-speed-api
feat(connections): add admin speed-only API with verified peer metadata
2026-10-19 14:59:34 +03:00
Public relations & Virtual technology 73cdd77bd3 Merge pull request #217 from Cr0Nos/fix/connections-rename-snapshot
fix(connections): prevent stale state overwrites after rename
2026-10-19 14:57:49 +03:00
Cr0Nos 6f510c060c fix(ssh): verify managed server host keys against trusted stores 2026-10-19 15:23:46 +08:00
Cr0Nos fd8aeedb6c fix(clients): stage and atomically replace clientsTable with checked backups 2026-10-17 23:27:29 +08:00
Cr0Nos e6e5bd6dca fix(clients): reject unverified metadata reads and stale mutation snapshots 2026-10-17 23:25:54 +08:00
leonidorlov-hash 8a2316085b fix(server): hide point-to-point transit prefixes from the IPv6 header
Providers route through a /126 (sometimes /127 or /128) onlink transit
network between the box and their router; those addresses are
infrastructure, not a public address. Keep only prefixes up to /64.
2026-10-17 15:25:37 +03:00
leonidorlov-hash e48a5f74cd test(awg): pin the RNG in MTU budget tests
test_awg3_default_would_not_fit_a_standard_link drew random obfuscation
sizes and asserted the old default MTU is unsafe for them; an unlucky
draw (overhead 120 bytes on a 1376 default) failed the assertion about
one run in ten, so CI on unrelated PRs flaked. Seeding the generator in
setUp keeps the scenario representative and makes the suite
deterministic.
2026-10-17 15:01:45 +03:00
leonidorlov-hash 152675111e fix(server): hide ULA addresses the provider marks as scope global
Some hosts carry fd00::/8 addresses flagged scope global, and they leaked
into the header. Filter them out explicitly.
2026-10-17 14:38:04 +03:00
leonidorlov-hash f78f665673 feat(server): show global IPv6 addresses in the page header
The header listed host:port and user only. Servers on dual-stack networks
also have public IPv6 addresses the admin had to look up over SSH. The
/stats endpoint now collects them (scope global, so ULA and link-local
stay excluded) and the page renders a second mono line under the address
when the list is non-empty.
2026-10-17 14:22:54 +03:00
Cr0Nos e4a0afd862 feat(connections): add admin speed-only API with explicit failure reporting 2026-10-17 15:05:42 +08:00
Cr0Nos 067861e73a fix(connections): merge rename results into fresh locked state 2026-10-17 15:01:51 +08:00
Public relations & Virtual technology 94a1a9f37c Update app.py
1.7.6
v1.7.6
2026-10-16 18:53:06 +03:00
Public relations & Virtual technology 82b122dc41 Merge pull request #215 from leonidorlov-hash/fix/unique-subnet-per-instance
fix(awg): allocate a unique tunnel subnet per instance on install
2026-10-16 18:51:59 +03:00
Public relations & Virtual technology 0277b74913 Merge pull request #214 from leonidorlov-hash/fix/awg-jc-recommended-range
fix(awg): generate Jc in the official 4-12 recommended band
2026-10-16 18:50:40 +03:00
Public relations & Virtual technology 8f9c05d3ba Merge pull request #213 from leonidorlov-hash/security/docs-admin-only
security(docs): serve /docs /redoc /openapi.json to admins only
2026-10-16 18:50:02 +03:00
Public relations & Virtual technology c3cdf485bf Merge pull request #212 from leonidorlov-hash/fix/clients-table-serialization
fix(clients): serialize clientsTable read-modify-write per container
2026-10-16 18:49:17 +03:00
Public relations & Virtual technology 4d6bbaf8b5 Merge pull request #211 from leonidorlov-hash/fix/conn-count-live-handshake
fix(awg): ignore connection counts of peers without a live handshake
2026-10-16 18:48:44 +03:00
leonidorlov-hash 2d184046d8 fix(awg): allocate a unique tunnel subnet per instance on install
Every fresh AWG/AWG2/AWG3 instance used to fall back to the same default
10.8.1.0/24 (fd42:8:1::/64) and handed out client IPs without looking at
the other containers on the host. With several instances on one server
the same client IP ended up assigned to different peers in different
containers, so host-level rules keyed by the tunnel subnet/IP (firewall,
exit links, smart route, traffic accounting) cannot tell the colliding
peers apart.

On a fresh install (no server config yet) the manager now scans the
Address lines of all amnezia-awg*/amnezia-wireguard containers on the
host and picks the smallest free subnet index N, installing the instance
into 10.8.N.0/24 and fd42:8:N::/64 instead. Existing configs are never
rewritten, and on any scan failure the install falls back to the
previous default behaviour.
2026-10-16 14:01:12 +03:00
leonidorlov-hash d0c12aaa63 fix(awg): generate Jc in the official 4-12 recommended band
The amneziawg-go README documents "Jc: int, recommended range is 4-12"
and the native AmneziaVPN installer picks 4-6. The panel generated
1-10, so fresh instances could land below the documented floor.
Clamp the range to 4-12 and pin it with a test.
2026-10-16 10:02:23 +03:00
leonidorlov-hash 0d34a67bd9 security(docs): serve /docs /redoc /openapi.json to admins only
The OpenAPI document is a ready-made map of every endpoint and parameter
of the panel; anonymous visitors could use it to enumerate features.
Guard the three schema routes with _check_admin (session cookie or admin
Bearer token both count) in a dedicated middleware.

SessionMiddleware has to wrap the new middleware for request.session to
be populated, so its installation moves below all @app.middleware
definitions (Starlette runs later-added middleware further out).
2026-10-16 00:30:09 +03:00
leonidorlov-hash 50ddf534de fix(clients): serialize clientsTable read-modify-write per container
Every mutating op reads the table, modifies its snapshot and saves it
back. Uvicorn runs these blocking calls in a thread pool, so two
overlapping ops (a rename racing an add, two toggles, ...) saved in
arbitrary order: the last write wins with a stale snapshot and silently
drops the other op's row. The lost row resurfaced as a synthesized
'External (native app)' entry — the WireGuard config stores no names —
which is how peer names got lost in production.

Hold a per-(host, container) threading.Lock across the whole
read-modify-write in both AWG and WireGuard managers. Saves already
invalidate the prefetched batch snapshot, so reads inside the lock
always see the freshest table.
2026-10-16 00:06:25 +03:00
leonidorlov-hash d0d2987cb4 fix(awg): ignore conn counts of peers without a live handshake
Conntrack entries outlive the VPN session by hours or even days (TCP
ESTABLISHED timeout), so a peer that disconnected long ago still 'owns'
~900 stale flows in /proc/net/nf_conntrack. The per-peer flood warning
counter attributed those stale flows to offline peers and kept posting
phantom '900 connections' warnings every hour.

Count connections only for peers whose latest handshake is fresh
(<= 5 minutes). When liveness cannot be determined the counter returns
empty instead of trusting stale data.
2026-10-15 23:16:47 +03:00
Public relations & Virtual technology c39e713ad4 Update app.py
v1.7.5
v1.7.5
2026-10-14 16:39:45 +03:00
Public relations & Virtual technology eeb29427d3 Merge pull request #210 from leonidorlov-hash/fix/install-network-abort
feat(install): survive a network abort during long protocol installs
2026-10-14 12:42:11 +03:00
Public relations & Virtual technology 86c9655463 Merge pull request #209 from Cr0Nos/fix/users-stale-snapshot
fix(users): prevent stale state overwrites during SSH operations
2026-10-14 12:00:23 +03:00
Public relations & Virtual technology f52544ba19 Merge pull request #208 from nightdread/codex/fix-telemt-faketls-links
fix(telemt): include FakeTLS secret in fallback proxy links
2026-10-14 11:59:46 +03:00
leonidorlov-hash 74519b2eaa chore: retrigger CI 2026-10-14 00:46:29 +03:00
leonidorlov-hash f0b830cd29 feat(install): survive a network abort during long protocol installs
A from-scratch Xray build keeps the install request busy for ~6 min;
a browser-to-panel connection loss (proxy/VPN timeout) surfaces as a
bare 'Failed to fetch' and looks like a failed install even though
the server side completed fine. On a network abort, poll /check for
the new protocol and report success when it shows up.
2026-10-13 23:41:58 +03:00