How anysda/vpn2 works
anysda-vpn2 is a self-hosted VPN service with a Nuxt administration panel, a Telegram bot, and entry/exit-node routing. The main user workflow is: an administrator creates a client and device, provisions a WireGuard, OpenVPN, or IKEv2 configuration, and the client connects through the Russian entry node; traffic is routed directly or through an exit. The graph also includes DNS filtering, monitoring, manual routes, and bot self-service. Several links reflect README-level architecture; unsampled implementations are represented only where the tree supports a path.
Main entry points: client-ops.ts Client API · gen-router-config.py Entry-node VPN · auth.ts Panel authentication · client.ts Panel database
Components 22
Web panel
- Admin panel
app/app/pages/clients.vue - Panel authentication
app/server/utils/auth.ts - Panel database
app/server/database/client.ts - Data model
app/server/database/schema.ts - SSO integration
app/server/utils/sso.ts
Client access
- Client API
app/server/utils/client-ops.ts - WireGuard provisioning
app/server/utils/wireguard.ts - OpenVPN provisioning
app/server/utils/openvpn.ts - IKEv2 provisioning
app/server/utils/ikev2.ts - Bot API
app/server/utils/bot-api.ts
VPN routing
- Entry-node VPN
infra/lib/gen-router-config.py - Exit failover
infra/lib/failover-watchdog.py - Exit nodes
- Manual routes
app/server/utils/routes-sync.ts
Operations
- Telegram bot
telegram/bot.py - DNS filtering
app/server/utils/dns-settings.ts - AdGuard Home
- Node monitoring
app/server/utils/vm-client.ts - Panel events
app/server/utils/events.ts
Other components
- Administrator
- VPN client
- Telegram user
Connections 22
- Administrator → Admin panel: manages clients
README.md - Admin panel → Panel authentication: authenticates requests
- Client API → Panel authentication: requires authentication
- Client API → Panel database: reads and writes
app/server/utils/client-ops.ts - Panel database → Data model: uses schema
app/server/database/client.ts - Client API → WireGuard provisioning: syncs configuration
app/server/utils/client-ops.ts - Client API → OpenVPN provisioning: syncs configuration
app/server/utils/client-ops.ts - Client API → IKEv2 provisioning: provisions access
app/server/utils/client-ops.ts - Administrator → Telegram bot: manages clients
README.md - Telegram user → Telegram bot: requests self-service
README.md - Telegram bot → Bot API: calls panel API
- Bot API → Panel database: reads client data
app/server/utils/bot-api.ts - VPN client → Entry-node VPN: connects by VPN
README.md - Entry-node VPN → Exit nodes: routes foreign traffic
README.md - Entry-node VPN → Exit failover: uses exit selection
README.md - Administrator → Manual routes: configures routes
README.md - Manual routes → Entry-node VPN: writes route file
app/server/utils/routes-sync.ts - Entry-node VPN → DNS filtering: uses DNS settings
- DNS filtering → AdGuard Home: queries and configures
- Administrator → Node monitoring: views node status
README.md - Client API → Panel events: records client events
app/server/utils/client-ops.ts - Panel authentication → SSO integration: uses SSO support
app/server/utils/auth.ts