Commit Graph

25 Commits

Author SHA1 Message Date
6cf49ff3e0 feat: add service catalog management with policy integration for domain-based resource access control
Add ServiceCatalogItem type and services CRUD API endpoints (list, create, update, delete). Extend Policy type to include services array with domain, upstream_ip, proxy_ip, and ports metadata.

Add ServicesPage component with table view and create/edit modals for managing service definitions. Include service name, domain, proxy, and upstream columns with port parsing logic.

Integrate service selection
2026-03-18 13:09:54 +01:00
ab7275059f feat: add web proxy target allowlist support via NEXAVPN_ALWAYS_ALLOW_WEB_PROXY_IPS environment variable
Add alwaysAllowWebProxyTargets function to parse comma-separated IPs from NEXAVPN_ALWAYS_ALLOW_WEB_PROXY_IPS environment variable with deduplication. Update mergeProfileAllowedIPs to accept webProxyTargets parameter and merge them into profile allowed IPs using /32 routes. Add WebProxyTargets field to wireguard.Peer struct and populate it in BuildSyncBundle and device enrollment/policy application
2026-03-18 09:39:40 +01:00
1e04a07ef8 feat: change gateway forward chain policy to accept and add explicit drop rule for WireGuard interface
Change nftables forward chain default policy from drop to accept. Add rule to accept all traffic not originating from WireGuard interface. Add explicit drop rule at end of chain for remaining WireGuard interface traffic to maintain security while allowing non-VPN traffic to flow freely.
2026-03-18 09:11:57 +01:00
77773493e2 refactor: remove BuildKit syntax directive and host network flags from Dockerfiles
Remove BuildKit syntax directive and --network=host flags from admin-web, backend, and gateway Dockerfiles to simplify builds and rely on default Docker networking for dependency downloads.
2026-03-18 09:10:39 +01:00
d67d25963d feat: enable host network access during Docker build stages for dependency downloads
Add BuildKit syntax directive and --network=host flag to npm install, go mod operations, and apk package installation to allow direct host network access during builds, bypassing Docker's default bridge network for improved reliability and performance of dependency downloads.
2026-03-18 09:09:52 +01:00
a5c65deed7 feat: replace nftables flush ruleset with targeted table deletion in gateway entrypoint
Remove global "flush ruleset" command from nftables configuration and add explicit "nft delete table inet nexavpn" before loading rules to avoid clearing unrelated firewall rules while ensuring clean nexavpn table state.
2026-03-18 09:08:26 +01:00
a2df8c33d4 feat: add retry logic and explicit Alpine repositories to gateway Dockerfile
Add explicit Alpine 3.21 main and community repository URLs to /etc/apk/repositories. Implement 5-attempt retry loop with 3-second delays for apk update and package installation to handle transient network failures during Docker builds.
2026-03-18 08:59:44 +01:00
e3bd6d3b96 feat: add DNS server routes to WireGuard profiles and gateway firewall rules
Add mergeProfileAllowedIPs function to combine policy destinations with DNS server routes in device enrollment and rotation. Add dnsServerRoute helper to convert DNS server IPs to /32 CIDR notation. Update BuildSyncBundle query to include gateway DNS servers in peer data. Add DNSServers field to wireguard.Peer struct. Update gateway nftables configuration to allow UDP/TCP port 53 traffic from assigned IPs to DNS servers before
2026-03-18 08:48:08 +01:00
a87a4664be refactor: remove net.ipv4.ip_forward sysctl from gateway service
Remove net.ipv4.ip_forward sysctl configuration from gateway service since host network mode requires IP forwarding to be configured at the host system level rather than per-container.
2026-03-18 08:31:21 +01:00
1721215c95 refactor: remove gateway network alias from backend service
Remove gateway network alias from backend service since gateway now uses host network mode and accesses backend directly via 127.0.0.1 instead of Docker network resolution.
2026-03-18 08:29:41 +01:00
4b16e0d4fc feat: switch gateway container to host network mode and replace host.docker.internal with 127.0.0.1
Change gateway service from bridge networking to host network mode to enable direct access to host network interfaces. Replace host.docker.internal references with 127.0.0.1 in gateway URLs and backend host configuration. Remove port mapping, extra_hosts, and explicit network attachments since host mode provides direct network access.
2026-03-18 08:28:33 +01:00
9ea2345982 feat: make gateway UDP port configurable via GATEWAY_UDP_PORT environment variable
Add GATEWAY_UDP_PORT environment variable with default value 51900 to replace hardcoded port 51820. Update DEFAULT_GATEWAY_ENDPOINT in .env.example to use new port. Add UDP port mapping to gateway service in docker-compose using GATEWAY_UDP_PORT. Add NEXAVPN_GATEWAY_LISTEN_PORT environment variable to gateway container. Update gateway-entrypoint.sh to use GATEWAY_LISTEN_PORT variable in bootstrap payload and WireGuard interface configuration.
2026-03-18 07:54:18 +01:00
610c5459e5 feat: add device traffic metrics with gateway telemetry reporting and admin UI display
Add rx_bytes and tx_bytes fields to Device type and API responses. Add formatDataSize helper for human-readable byte formatting with units from B to TB. Add Received and Sent columns to devices table in admin UI with formatted traffic totals. Add traffic metrics display to device action panel.

Add TelemetrySnapshot and PeerTelemetry types for gateway runtime stats. Add gateway telemetry endpoint at POST /gateway
2026-03-18 07:43:22 +01:00
31369a7743 feat: add tunnel status checking with active interface verification
Add tunnel_status command to desktop client for querying active tunnel state. Add is_active method to tunnel_manager that calls status command on bundled backend. Add status command to tunnel-helper that checks WireGuard service state on Windows via sc query and interface state on macOS via wg show. Add windows_client_status function for IPC-based status queries with active field in TunnelResponse. Update App.tsx to query tunnel status on
2026-03-18 07:02:39 +01:00
1d69b20fcc refactor: consolidate public-web port to 8080 and add API proxy configuration
Remove backend port exposure and change public-web from port 8082 to 8080. Add backend dependency to public-web service. Remove public-web dependency from nginx service. Add /api/ location block to public-web nginx config with proxy_pass to backend:8080 and proxy headers for Host, X-Real-IP, X-Forwarded-For and X-Forwarded-Proto.
2026-03-17 22:13:46 +01:00
65e74c6832 feat: add public-facing web interface with domain-based routing
Add public-web service with static landing page for client enrollment and device provisioning. Add public-web container to docker-compose with port 8082. Configure nginx reverse proxy with domain-based routing: admin-vpn.nesterovic.cc for admin interface and vpn.nesterovic.cc for public interface. Add proxy headers for X-Real-IP, X-Forwarded-For and X-Forwarded-Proto to both server blocks. Create public-web Dockerfile with nginx serving
2026-03-17 22:09:37 +01:00
4a2985ae5e fix: change gateway backend URLs from service name to host.docker.internal
Update gateway configuration to use host.docker.internal instead of backend service name for API communication. Add extra_hosts mapping in docker-compose to enable host.docker.internal resolution. Add NEXAVPN_BACKEND_HOST environment variable to .env.example with host.docker.internal default.
2026-03-17 19:43:56 +01:00
e2362c6033 feat: add logout functionality and auto-logout on 401 responses
Add AUTH_EXPIRED_EVENT constant and dispatch event on 401 responses in API client, clearing stored token. Add handleLogout function to App component and wire up event listener to trigger logout on auth expiration. Pass onLogout prop to Layout component and add Logout button to topbar-actions. Update CSS to apply flex layout to topbar-actions and make responsive. Add backend hostname and network aliases in docker-compose to ensure consistent
2026-03-17 19:39:13 +01:00
d4e8fc28c7 fix: remove DNS resolution check from gateway bootstrap flow
Remove wait_for_backend_dns function and its invocation from apply_bundle, relying instead on curl connectivity checks in main loop to handle backend availability. Simplifies bootstrap logic by removing redundant DNS verification step.
2026-03-17 19:30:38 +01:00
92618ee65b fix: make backend DNS check optional when getent is unavailable
Add getent availability check before attempting DNS resolution in wait_for_backend_dns function. Fall back to allowing curl connectivity check in main loop when getent is not available, supporting Alpine-based images that don't ship getent by default.
2026-03-17 19:26:10 +01:00
6349147d8d feat: add backend DNS resolution check and improve gateway sync reliability
Add wait_for_backend_dns function to verify backend hostname resolution before attempting bootstrap/sync operations. Configure NEXAVPN_BACKEND_HOST environment variable and net.ipv4.ip_forward sysctl in docker-compose. Use atomic write pattern for state.json via temporary file to prevent corruption on failed downloads. Make sysctl ip_forward call conditional on write permissions and non-fatal.
2026-03-17 19:21:39 +01:00
4d687082af fix: add backend dependency and retry logic to gateway bootstrap
Add depends_on backend service to gateway in docker-compose to ensure backend is available before gateway starts. Refactor gateway-entrypoint.sh to move bootstrap logic into apply_bundle function with error handling, enabling automatic retry on bootstrap failure instead of exiting immediately.
2026-03-17 19:18:35 +01:00
16fc6cb1b6 feat: add gateway bootstrap endpoint with token-based authentication
Add Bootstrap and AgentSyncBundle handlers to gateway package with X-Gateway-Bootstrap-Token header authentication. Implement UpsertByName repository method for idempotent gateway registration. Update gateway entrypoint script to auto-generate keys and bootstrap gateway on first run, persisting gateway ID to disk. Add GATEWAY_BOOTSTRAP_TOKEN config and update environment variables for gateway name, bootstrap URL, and sync URL.
2026-03-17 18:53:26 +01:00
6ec5133773 docs: update README with desktop requirements, helper builds, and realistic MVP usage notes
Expand README with desktop platform requirements (Windows x86, macOS ARM), helper build commands, gateway utility scripts, and updated local test flow. Add realistic MVP usage section clarifying current platform build status, gateway configuration needs, and admin debug profile behavior with client private key handling.
2026-03-16 06:30:08 +01:00
830491cb0d chore: initial project scaffold with admin web, backend, desktop client, and deployment setup
Add monorepo structure for NexaVPN WireGuard control plane including:
- .gitignore for node_modules, build artifacts, and environment files
- README with project overview, monorepo layout, and quick start guide
- Admin web UI with React, Vite, TypeScript, and nginx reverse proxy
- API client with type definitions for users, devices, policies, gateways, and audit logs
- Admin pages for dashboard, users, devices, policies, g
2026-03-15 16:32:34 +01:00