Commit Graph
14 Commits
Author SHA1 Message Date
hellandClaude Opus 5 69893ba340 feat(exit): route client traffic through another panel server
Today a client leaves to the internet from the same server it connected to.
Exit nodes split the two: clients connect to an *entry* node (reachable,
possibly behind DPI) and egress from an *exit* node (clean IP, other country).
One exit serves many entries and keeps serving its own AWG clients.

    client --AWG--> [entry] amnezia-awg2 --WG/AWG link--> [exit] amnezia-exit --> internet
                    awg0 10.8.1.0/24                     transit0 10.9.0.0/24
                    exit0 10.9.0.N (Table=off)           one [Peer] per entry, /32

Exit side: a new protocol `exit` = container `amnezia-exit`, an AmneziaWG
listener on 55520/udp over the transit subnet 10.9.0.0/24. Peers are panel
nodes, never end users, and live in their own peersTable. ExitManager
subclasses AWGManager and closes every client-facing method.

Entry side: a second interface `exit0` inside the existing AWG container with
`Table = off`, plus policy routing - `from <client subnet> lookup 200`,
`default dev exit0` in table 200, and `blackhole default metric 1000` as a
kill-switch installed *before* the client tunnel comes up, so a container
restart cannot leak. Clients are MASQUERADEd into the entry's transit /32, so
the identical 10.8.1.0/24 of every instance can never collide at the exit.
TCP MSS is clamped, and rules 190/191 keep client<->client and AmneziaDNS
traffic local. State is file-driven: exit0.conf present means linked, and the
same shell block runs at container start and on a live (un)link.

Link crypto is WireGuard; AWG obfuscation is a per-exit-node property for hops
that cross DPI, and S3/S4 are deliberately not written on the transit - they
pad every transport packet and would eat the MTU budget of a tunnel inside a
tunnel. Private keys are generated inside the containers; the panel carries
public keys and a per-peer PSK only.

exit_link_service.py orchestrates linking with per-(entry, protocol) locks,
SSH off the event loop, a 15-second handshake gate that rolls back, and
lifecycle hooks for every way a link can go stale: exit uninstalled, stopped,
deleted, host cleared, entry reinstalled, container gone, backup restored.
Servers get a stable `uid` (already upstream) so reorder and delete cannot
break a link.

IPv4 only for now: while linked, client IPv6 is refused with `unreachable`
rather than leaking out of the entry.

Also included: an egress check that curls a public IP service bound to the
tunnel gateway (the client's exact path) and compares it with the direct one;
optional DNS resolution at the exit node; a default exit node applied to new
AWG installs; and reconciliation after a protocol restore.

244 tests pass. CURRENT_VERSION is untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-08 23:05:51 +07:00
Viktor Baranov 30156c5829 feat(ui): design system and mobile layout overhaul 2026-09-05 16:55:33 +03:00
Viktor Baranov c981c775ff feat: flexible self-service protocols 2026-09-02 15:35:46 +03:00
Viktor Baranov 581ad0dbd0 fix: address self-service review findings 2026-08-26 21:52:00 +03:00
Viktor Baranov 4f8c3e4bb6 fix: add self-service settings HTML form to settings page 2026-08-25 09:31:40 +03:00
Viktor Baranov cd0c05852a feat: add self-service UI to settings, server edit, and nav 2026-08-25 09:10:43 +03:00
Максимов Владимир Сергеевич dec0e90d11 v1.6.0
Fixed merge requests
Reset user traffic consumption
Implemented automatic backups
2026-08-24 19:14:04 +03:00
Public relations & Virtual technology dd8bda3ac1 Version 1.5.0
Added Cloudflare WARP support
Added Market Templates
Added Multi-protocol support
Fixed SOCKS5 management
Added NGINX + Let's Encrypt integration
Updated built-in configuration editor
Added Backup / Migrate protocols (Alpha)
Added Admin Telegram bot role
2026-07-09 17:53:38 +03:00
Public relations & Virtual technology a62f9587ef Add public tunnels and fix protocol connection bugs
Add public tunnel management and fix connection stability issues

- Add Tunnels block to settings with Local Server, Cloudflare Quick Tunnel, and ngrok support
- Implement one-click tunnel install, enable, stop, and delete actions
- Persist tunnel PID and public URL state across panel restarts
- Improve tunnel process detection and cleanup on Windows, Linux, and Docker
- Add tunnel translations and README documentation

- Fix settings save 422 when server list is empty and Remnawave auto-create is disabled
- Fix AWG Legacy config path resolution by detecting actual wg0.conf/awg0.conf inside container
- Fix Xray client add/toggle/remove flow to use runtime API without restarting the container
- Fix WireGuard Show config calls by routing get_client_config through the unified manager adapter
2026-06-19 19:28:51 +03:00
Public relations & Virtual technology 29def95df8 v1.4.3
Add SOCKS5 support
Add AdGuard Home integration
Add node status and latency tracking
Add drag-and-drop server management
Upgrade Xray from v1.8 to v26.3.27 with backward compatibility
Fix Telemt dependency installation
Extend Telegram bot to support all protocols
Improve server cleanup process
Enhance API structure (system routes moved to a separate group)
Add JWT token generation for external integrations
2026-05-04 16:01:06 +03:00
Public relations & Virtual technology 1fd100e4e9 Update v1.4.0
1) Added WireGuard support
2) Xray improved link generation after config updates
3) Added: version display, new version check, download
2026-04-15 17:32:35 +03:00
Public relations & Virtual technology 565c7f8232 v1.3.2
Added a subscription expiration date option for users.
Added support for SSL / HTTPS Settings (Port/Certificate)
Fixed Amnezia configuration.
2026-04-06 18:52:35 +03:00
Public relations & Virtual technology 6c4a512a0d Add support AWG 2.0 and other.
* Added support for Amnezia 2.0
* Added support for native installation of Amnezia 2.0
* Added display of messages when attempting to view files created by a native application
* Improved polling of native installation servers while preserving active protocols
* Added editing of the main config file via the web panel
2026-03-23 14:48:03 +03:00
Public relations & Virtual technology 814feeda06 Simple Enjoy 2026-03-16 15:39:35 +03:00