Commit Graph

20 Commits

Author SHA1 Message Date
andrey271192
cff27e27b6 feat: import clients from amnezia configs 2026-06-21 18:22:36 +03:00
andrey271192
cdd47f157b feat(instances): show app-installed AmneziaWG, not only panel-created
The instances section listed only panel-managed instances, so an
AmneziaWG container set up by the Amnezia desktop app (e.g.
amnezia-awg2) did not appear as a card.

/api/instances now iterates ALL effective profiles (env-discovered +
managed): resolves each container, reads ListenPort and peer count,
and detects the variant from the interface config (S3/S4 -> awg2,
S1/S2 -> awg, wg0 -> legacy). Native (non-managed) instances are
flagged managed:false.

UI: native cards get an "приложение Amnezia" tag and hide the Удалить
button (the panel must not tear down app-managed containers); they
keep Подключения and Стоп/Старт. Stop/start now resolve the real
container name so they work for native instances too.

Verified live: native amnezia-awg2 shows as "AmneziaWG 2.0" port
37395 (managed:false) alongside a panel-created Legacy :5534.
2026-06-16 21:40:42 +03:00
andrey271192
546c1127f8 feat: deploy AmneziaWG instances from the panel (no Amnezia app)
Add a "Протоколы / инстансы" section that spins up AmneziaWG server
containers straight from the panel, with port + variant selection —
no need to run the Amnezia desktop app to set up the server.

Core (scripts/awg-instance.sh):
- create <awg2|awg|legacy> <port> [name]: pulls the public image
  (amneziavpn/amneziawg-go:2.0.0 / :0.2.18 / amneziavpn/amnezia-wg),
  generates server keys + psk, writes awg0.conf/wg0.conf with a free
  10.8.<N>.0/24 subnet (scans running containers to avoid clashes),
  random AmneziaWG obfuscation (Jc/Jmin/Jmax/S1..S4/H1..H4 as single
  uint32 values — ranges break awg setconf), and a start.sh that
  brings the iface up via userspace amneziawg-go + NAT MASQUERADE.
  remove <name>, list.

Backend (server.js):
- Profiles are now dynamic: env AWG_PROFILES merged with managed
  instances persisted in /data/instances.json (getProfiles()), so a
  new instance is usable immediately without restarting the panel.
- /api/instances (list with running/peers), /api/instances/create,
  /delete, /stop, /start. create runs the script then registers the
  profile; delete tears down container + data + profile.

Infra:
- Dockerfile: add bash iproute2 coreutils, COPY scripts.
- install.sh: mkdir /opt/amnezia-instances and bind-mount it into the
  panel so docker-in-docker bind paths line up.

UI (index.html/app.js/styles.css):
- Cards per instance (icon, NEW badge, description, РАБОТАЕТ/ОСТАНОВЛЕН,
  port, connections) with Стоп/Старт, Подключения (switches the active
  instance), Удалить; plus a create form (variant + port).

Verified end to end on a live VPS: create awg2/awg/legacy instances,
interfaces come up, a client created on a new instance gets the right
subnet (10.8.20.2) and Endpoint (host:51850).
2026-06-16 21:33:02 +03:00
andrey271192
2899bba55f style: compact icon action buttons, no horizontal scroll
Replace text action buttons with 32px icon buttons (tooltips kept
via title/aria-label): ⏻ выключить, ▶ включить, ⬇ .conf,
🔗 прямая ссылка, ⧉ копировать URL, 🗑 удалить. Actions cell
shrinks to content (width:1%, nowrap) so the table fits without
left-right scrolling.
2026-06-16 19:57:49 +03:00
andrey271192
4ebb81cede style: client action buttons flow in a row, not a column
Widen actions cell (min-width 360px) and keep buttons nowrap +
no-shrink so Выключить/Скачать/Прямая ссылка/Копировать/Удалить
wrap horizontally instead of stacking one per line.
2026-06-16 19:50:54 +03:00
Андрей Бобырев
038020408a feat: donate links on login screen + unified README support block
- public/index.html: gate-donate nav with Boosty/Ozon/Telegram on login
- public/styles.css: .gate-donate styles
- landing: proj-support-strip
- README: blockquote + "Поддержка проекта" section
- .github/FUNDING.yml: added
- version bumped to 1.2.28

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-15 05:52:17 +03:00
Андрей Бобырев
df1f9dc826 docs(ui): human cascade guide + kaskad_web_vpn
Expand cascade fold with steps, DNAT primer, install one-liner, link to github.com/andrey271192/kaskad_web_vpn; README and panel-guide aligned.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-15 04:49:14 +03:00
Андрей Бобырев
0e7a7df636 feat(mtproto): Telegram proxy panel and /api routes
- Docker telegrammessenger/proxy: install/restart/remove from UI
- GET/POST /api/mtproto/*, UI_HIDE_MTPROTO / UI_HIDE_SECTIONS=mtproto
- install.sh vars MTPRO_*; /health returns version; docs

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-15 04:39:19 +03:00
Андрей Бобырев
c454b9e701 feat: split community (read-only) vs PRO panel editions
Add AMNEZIA_EDITION=community with API/UI locks for client mutations,
export, cascade, WARP and host time sync; banner + Boosty CTA.
Install passes edition from AMNEZIA_EDITION env or .amnezia-panel-edition.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 21:51:24 +03:00
Андрей Бобырев
47842a4047 fix(ui): collapsible panels with arrow + tighter clients table
Use details/summary for WARP, cascade, users; fix broken users markup.
Fold long last_config hints; fixed table columns; widen shell max width.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 20:11:45 +03:00
Андрей Бобырев
f3aab6cc6e feat: cascade client — custom Endpoint + AWG_PROFILES hint
- POST /api/clients/create-cascade: genkeys, add peer, save last_config, download .conf
- Optional tunnel IP in VPN subnet; obfuscation from server [Interface] when present
- /api/protocols: singleProfile hint for missing instance selector
- UI: cascade form, profile banner; README cascade section

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 18:44:11 +03:00
Андрей Бобырев
227bb94627 fix: preserve AWG_PROFILES on reinstall; GET export URL + token
- install.sh: snapshot /root/amnezia-admin.awg-profiles.json + restore from old container
- GET /api/clients/export-config (+ profileId); optional EXPORT_CONFIG_SECRET
- UI: direct link, copy URL, hint when last_config missing

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 18:32:51 +03:00
Андрей Бобырев
6f6fb5f9b9 feat: Cloudflare WARP routing for AmneziaWG
Web toggles per IPv4 peer; wgcf install script on host (no Telegram/QR).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 18:00:39 +03:00
Андрей Бобырев
40d236c228 fix(ui): separate server vs browser TZ; highlight sync from device
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 17:08:07 +03:00
Андрей Бобырев
dfae0d8256 feat(time): server TZ display; optional SSH host sync via root pw
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 16:44:01 +03:00
Андрей Бобырев
860a56dc5d feat: AWG profile switcher; scheduled tunnel disconnect
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 16:37:27 +03:00
Андрей Бобырев
6fbe314f99 fix(ui): show server clock in browser TZ; sync button refetches
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 16:29:44 +03:00
Андрей Бобырев
1c22f89d5a feat(ui): show server and browser date/time in toolbar
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 16:14:27 +03:00
Андрей Бобырев
7b291ff1d5 feat(ui): optional tunnel disable when setting disconnect date
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 15:55:20 +03:00
Андрей Бобырев
ede0c66415 docs: publish install/uninstall scripts, README, FUNDING, support footer
Add curl-one-liner install with generated password file; uninstall flags for image/data/src; optional ALLOW_DEFAULT_PASSWORD; footer mirroring GitHub/Boosty/Telegram layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 15:40:55 +03:00