125 Commits

Author SHA1 Message Date
85051f5565 ded 2026-03-25 08:11:23 +01:00
f2b52959e6 a 2026-03-25 07:23:07 +01:00
4c718b625f refractor: generate missing MacOS specific icns 2026-03-25 07:16:45 +01:00
778a3fc258 refractor: add missing MacOS depencies for tauri application 2026-03-25 07:11:37 +01:00
b4b3494e17 feat: add optional app version input to Windows desktop client build workflow with dynamic artifact naming
Add app_version workflow_dispatch input for specifying custom version during manual builds. Implement version application step that validates input format and updates package.json, tauri.conf.json, and Cargo.toml with requested version string.

Add artifact name suffix based on provided version to distinguish versioned build outputs. Append version to NexaVPN-windows-installer and NexaVPN-windows
2026-03-24 18:58:22 +01:00
3aca2ca55a feat: suppress WireGuard GUI auto-launch after MSI installation on Windows
Add DO_NOT_LAUNCH=1 argument to msiexec command to prevent WireGuard application from automatically starting after runtime installation completes.
2026-03-24 18:56:52 +01:00
5003a2f0f7 feat: add automated WireGuard runtime installation for Windows desktop client with bundled MSI installer
Add install-runtime command to tunnel-helper for automated WireGuard installation on Windows. Download and bundle official WireGuard MSI during build process with automatic version discovery from wireguard.com.

Add ensure_windows_runtime_installed checks before connect/disconnect operations. Implement install_windows_runtime with UAC elevation prompt and install_windows_runtime_direct for MS
2026-03-24 18:35:19 +01:00
3f7e830761 feat: add status page HTML to public-web nginx container for platform health monitoring
Add status.html to Dockerfile COPY instructions for serving public status page alongside main landing page.
2026-03-24 18:28:48 +01:00
ff7eff8242 feat: add public status page with component health monitoring and system metrics visualization
Add statuspage package with service, handler, and types for exposing platform health. Implement GET /api/v1/status endpoint returning operational status, component health (API, database, gateway runtime), and control plane summary counts.

Add Service.Snapshot method querying database connectivity, user/device/gateway/service/policy counts, connected device count via handshake timestamps, and gateway runtime tel
2026-03-24 18:25:55 +01:00
9aa4a13fd5 refactor: streamline dashboard layout by consolidating hero metrics and removing redundant stats grid
Remove four-card stats grid section and consolidate key metrics into hero banner. Add Policies mini-stat showing active and service-based policy counts. Replace revoked device count with total traffic summary in Devices mini-stat.

Update hero grid layout from 3-column to 2-column metrics display. Add owner_username to traffic leaders and recent devices lists for better user context.

Remove dashboard
2026-03-24 18:11:53 +01:00
e3da49ec23 feat: add device connection status and owner username to device listings with handshake-based connectivity detection
Add connection_status and owner_username fields to Device model. Join users table in ListByUser and ListAll queries to populate owner_username from username column.

Parse latest_handshake_at from gateway runtime snapshots and aggregate across peers. Add isPeerConnected helper with 3-minute handshake timeout threshold. Set connection_status to "connected" or "disconnected" based on handsh
2026-03-24 18:07:46 +01:00
6e68b13c06 feat: add tunnel throughput distribution card with traffic summary stats and device bandwidth visualization
Add traffic overview card to dashboard main grid showing total received, sent, and combined tunnel throughput. Display top 5 devices with horizontal bar chart visualization proportional to busiest device total.

Calculate busiestDeviceTotal from topDevices max combined rx/tx bytes. Add dashboard-traffic-summary grid with three stat cards, dashboard-traffic-list with device rows showing name
2026-03-24 18:06:38 +01:00
80660d1c12 feat: add comprehensive dashboard with live metrics, traffic leaders, and audit stream visualization
Replace placeholder dashboard with full operational overview including user/device/gateway summary hero, four-metric stats grid, top devices by traffic, recent audit events stream, service exposure posture, and gateway enforcement note.

Add formatBytes and formatRelativeDate utility functions for human-readable data display. Fetch users, devices, gateways, policies, services, and audit data with
2026-03-24 18:04:40 +01:00
c1f1b6c41f refactor: organize sidebar navigation into categorized sections with Overview, Access, and Infrastructure groups
Group navigation items into three sections with section titles. Add nav-sections and nav-section containers with gap spacing and uppercase section title styling.

Remove topbar icon wrapper and associated styling. Center sidebar brand logo with justify-content and add bottom padding. Adjust nav margin-top to 0 and move gap spacing to nav-sections level.

Move page-title-icon dimensions
2026-03-24 17:58:22 +01:00
8282c1fbf4 refactor: restore original logo image and update color scheme with cyan-violet gradient palette
Replace inline SVG brand glyph with NexaVPN_Logo.png image in sidebar. Simplify brand-block to sidebar-brand with logo image styling.

Update CSS color variables from green accent (#74e0b8) to cyan (#44e6e7) with violet (#8d5bff) and blue (#4a8cff) accents. Adjust background gradients to use new cyan-violet-blue palette with updated opacity values.

Update nav-link hover and active states with cyan-blue gradient background. Modify sidebar background
2026-03-24 17:54:59 +01:00
1a2044537d feat: add lucide-react icons and redesign admin UI with enhanced visual hierarchy
Add lucide-react dependency and create app-icons module with icon mappings for all admin sections. Replace logo images with inline SVG brand glyph component.

Update Layout component with icon-enhanced navigation links including chevron indicators and hover states. Add topbar icon wrapper with gradient background styling.

Redesign Page component header with icon, eyebrow text, and improved title block layout. Add page
2026-03-24 17:47:47 +01:00
4b6b49ac31 README.md aktualisiert 2026-03-20 08:11:45 +00:00
60bca85e27 feat: add comprehensive architecture diagram to README with component flow visualization
Add ASCII architecture diagram showing NexaVPN system components and data flow. Document reverse-proxy ingress, public-web frontend, backend control plane, postgres database, gateway WireGuard interface, vpn-dns service, and access-proxy enforcement layer.

Include desktop client flow diagram showing login, profile sync, WireGuard connection, split-tunnel routing, and service-domain access through DNS override
2026-03-20 09:05:01 +01:00
784971f111 feat: add environment-based DNS server override support with service-aware fallback logic
Add dnsServersForProfile and dnsServersForPeer helpers with conditional DNS server selection based on service presence. Use NEXAVPN_CLIENT_DNS_SERVERS override when services are configured, otherwise fall back to DEFAULT_DNS_SERVERS or gateway base DNS servers.

Replace direct gateway DNS server usage in Enroll and applyCurrentPolicy with profileDNSServers variable. Update BuildSyncBundle to scan gateway DNS servers separately
2026-03-20 08:30:35 +01:00
b199b58840 feat: add device deletion endpoint with cascade cleanup and admin UI integration
Add DELETE /admin/devices/{id} endpoint with cascade deletion of device records, WireGuard peers, IP allocations, and device access profile settings. Update device status to 'deleted' and set deleted_at timestamp while preserving revoked_at if already set.

Add deleteDevice API method and delete button to devices page with query invalidation for both devices and device-profile lists. Record admin.device.deleted audit
2026-03-19 22:59:07 +01:00
a8a88140af refactor: replace Peek with ReadFull in TLS ClientHello parsing to prevent buffering issues
Replace bufio.Reader.Peek calls with io.ReadFull for header and record body reading. Allocate header and full buffers explicitly and copy header into full buffer before reading remaining bytes. Remove redundant byte slice copy when returning full ClientHello data.
2026-03-19 22:38:12 +01:00
e412395ade feat: add bind directive to CoreDNS configuration for explicit listen address control
Extract NEXAVPN_VPN_DNS_ADDR environment variable to listenAddr with empty string validation and :53 fallback. Add bind directive to Corefile template using listenAddr variable. Keep zone definition as .:53 for all-domain matching while controlling bind address separately.
2026-03-19 22:30:19 +01:00
74587ec8e1 refactor: move vpn-dns config directory from /etc/coredns to /tmp/nexavpn-vpn-dns
Add configDir, corefilePath, and overridesPath constants pointing to /tmp/nexavpn-vpn-dns directory. Update all file path references in writeCorefile and refreshOverrides to use new constants instead of hardcoded /etc/coredns paths.
2026-03-19 22:27:52 +01:00
5d5f736e1b refactor: move default destination fallback after profile resolution and add nftables input chain filtering for VPN clients
Move default 172.16.10.0/24 destination assignment to after profile resolution and only apply when both selectedDestinations and services are empty. Extract selectedServices calculation before conditional check in applyCurrentPolicy.

Add nftables input chain to gateway with per-peer filtering. Accept established connections and non-WireGuard traffic. Allow DNS queries to configured
2026-03-19 22:26:03 +01:00
bee9e63ace s 2026-03-18 15:06:44 +01:00
4b2d50b603 fix: resolve symlinks when copying WireGuard tools for macOS bundle
Add -L flag to cp commands to dereference symlinks and copy actual binaries instead of symlink references when bundling wg and wg-quick tools for aarch64-apple-darwin target.
2026-03-18 14:39:55 +01:00
a80a87e5ca feat: add macOS tunnel interface verification with retry logic after wg-quick up
Add wait_for_macos_tunnel_running helper with 6-second polling loop checking tunnel_service_is_active after wg-quick up command. Retry up to 12 times with 500ms intervals before returning error if interface not verified.
2026-03-18 14:34:17 +01:00
8eb293e01e feat: add bundled WireGuard tools support for macOS desktop client with fallback path resolution
Add wg and wg-quick bundling to build-tunnel-helper.sh for aarch64-apple-darwin target. Check for wireguard-tools installation and copy binaries to output directory with execute permissions.

Implement find_wg_quick helper with bundled tool detection and standard path fallbacks. Add bundled_macos_tool to check for tools in current executable directory. Update connect_direct and disconnect_direct to use explicit
2026-03-18 14:31:37 +01:00
5233e90dce feat: add macOS desktop client build workflow with ARM64 support and fix tunnel metrics task ownership
Add macos-desktop-client.yml workflow with manual dispatch trigger running on macos-arm64 runner. Install Node.js 22 and Rust toolchain with aarch64-apple-darwin target. Build bundled tunnel helper and Tauri application bundle, then upload .app, .dmg, and raw build artifacts.

Fix tunnel_metrics handler to clone app handle before spawn_blocking to prevent ownership issues when passing to tunnel
2026-03-18 14:27:26 +01:00
3e2169f217 feat: add VPN DNS service with dynamic service catalog resolution and CoreDNS integration
Add ServiceDNSRecord type and gateway API endpoint to expose active service domain-to-IP mappings. Implement ListServiceDNSRecords repository method querying services table with proxy_ip resolution using effectiveAccessProxyIP helper.

Add vpn-dns microservice built on CoreDNS with periodic sync from backend API. Generate Corefile with configurable upstream DNS servers and hosts plugin for service overrides.
2026-03-18 13:30:34 +01:00
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
0ac93dfeb6 refactor: wrap tunnel connect/disconnect operations in spawn_blocking and add pending state UI feedback
Move tunnel_manager::connect and disconnect calls into spawn_blocking tasks to prevent blocking async runtime. Clone app handle and profile path before spawning. Add map_err for task join failures.

Add tunnelActionPending state to track in-progress tunnel operations. Pass busy prop to AppHeader and disable sync/logout/connect buttons during tunnel actions. Update connect button text to show "
2026-03-18 12:35:25 +01:00
10dbd186ed feat: add code signing support for Windows desktop client executables and installers
Add osslsigncode dependency and implement three-step signing workflow. Decode base64-encoded PFX certificate from secrets, sign bundled tunnel helper before build, then sign desktop executable and NSIS installer after build. Use configurable timestamp URL with DigiCert fallback. Clean up certificate file in always-run step to prevent secret leakage.
2026-03-18 12:28:53 +01:00
aaa601a8ba feat: add access profile selection support with device-specific profile persistence
Add SelectOwnProfile handler to allow users to choose from available access profiles. Store selected profile ID per device in settings table with device_access_profile category. Implement GetSelectedProfileID and SetSelectedProfileID repository methods using JSONB storage.

Add ListSelectableProfiles to policy repository and service to query user/group/device-specific profiles ordered by priority. Filter gateway
2026-03-18 12:21:48 +01:00
1ddcbf0b14 refactor: extract UI components and redesign desktop client interface with improved visual hierarchy
Extract App.tsx logic into reusable components: AppHeader, ResourcePanel, StatusCard, StatTile, and ActionButton. Replace inline markup with component composition and props-based data flow.

Redesign visual system with enhanced gradients, refined color palette, and improved spacing. Update app-shell grid layout with 18px gaps and 1140px max width. Add radial gradient overlays and linear background
2026-03-18 11:42:34 +01:00
74d8fc28cc feat: add LLVM toolchain dependencies to Windows desktop client build workflow
Add clang, lld, and llvm packages to apt-get install step to provide complete LLVM toolchain for cross-compilation build process.
2026-03-18 11:18:27 +01:00
caec578985 refactor: add PATH search logic to cargo-xwin wrapper script to find real binary outside script directory
Replace direct cargo xwin execution with PATH traversal to locate actual cargo-xwin binary outside script's own directory. Add error handling with installation instructions when binary not found. Skip script's own directory and empty PATH entries during search.
2026-03-18 10:56:58 +01:00
19d89047f0 refactor: switch Windows desktop client workflow from generic Linux to ubuntu-latest runner
Replace generic linux runner label with ubuntu-latest to ensure consistent build environment and better compatibility with GitHub Actions ecosystem.
2026-03-18 10:49:15 +01:00
420dde247e refactor: remove push trigger and self-hosted runner requirement from Windows desktop client workflow
Remove automatic push trigger on main/master branches and desktop-client path changes, keeping only manual workflow_dispatch. Remove self-hosted runner requirement to allow running on any Linux runner.
2026-03-18 10:48:24 +01:00
0ca1c0cb3f feat: add Gitea CI workflow for cross-compiling Windows desktop client on Linux
Some checks failed
Build Windows Desktop Client / Build Windows Client (push) Has been cancelled
Add workflow to build Windows desktop client using cargo-xwin on Linux runners. Install Node.js 22, Rust with x86_64-pc-windows-msvc target, and required system dependencies including NSIS for installer creation. Build bundled Windows tunnel helper and desktop client installer, then upload both NSIS installer artifacts and raw executables.
2026-03-18 10:46:39 +01:00
fcc32f253b refactor: adjust grid alignment and responsive breakpoint for improved layout consistency
Add align-items: start to body-grid and align-content: start to status-grid to prevent vertical stretching and maintain top alignment. Reduce responsive breakpoint from 960px to 760px to match new default window width.
2026-03-18 10:41:10 +01:00
1c496435f5 refactor: reduce UI spacing and dimensions throughout desktop client for more compact layout
Reduce padding, gaps, and font sizes across all components. Change html/body/root from min-height to fixed height with overflow hidden. Decrease app-frame padding from 18px to 12px and add grid-template-rows with overflow handling. Reduce brand lockup logo from 54px to 44px and adjust gaps throughout. Decrease button padding, surface padding, and card padding. Reduce body-grid sidebar from 290px to 250px.
2026-03-18 10:37:52 +01:00
56acc96229 refactor: reduce window size and remove transfer metrics display from main UI
Reduce default window dimensions from 1120x760 to 940x640 pixels and disable resizing. Remove TunnelMetrics and RawTunnelMetrics types, formatDataSize and normalizeTunnelMetrics helpers, and all transfer statistics tracking from App component. Replace refreshTunnelMetrics with simpler refreshTunnelStatus that only queries tunnel active state. Remove received/sent data display cards from status panel and eliminate metrics
2026-03-18 10:34:12 +01:00
799bc6550e feat: add dynamic tray icon with connected/disconnected states and green checkmark badge
Add png dependency and tauri image-png feature to support custom tray icon rendering. Load base disconnected icon from bundled PNG and generate connected variant with green circular badge containing white checkmark overlay. Implement draw_check_badge, draw_line, and blend_pixel helpers using Bresenham's line algorithm for badge rendering. Store both icon variants and TrayIcon reference in TrayState and update icon
2026-03-18 10:28:03 +01:00
9f32c273e0 refactor: replace async runtime with blocking thread for tray menu refresh and mark unused state parameter
Replace tauri::async_runtime::spawn with std::thread::spawn for periodic tray menu refresh background task and change async sleep to blocking thread sleep. Prefix unused state parameter with underscore in sync_profile command to suppress compiler warnings.
2026-03-18 10:06:18 +01:00
0fcea99006 feat: add periodic tray menu refresh and normalize tunnel metrics field names
Add background task to refresh tray menu every 5 seconds to keep status display current. Add RawTunnelMetrics type and normalizeTunnelMetrics helper to handle both snake_case and camelCase field names from backend responses. Update refreshTunnelMetrics to normalize metrics before setting state and explicitly cast active status to boolean.
2026-03-18 10:04:55 +01:00
184192e1c2 feat: add fallback to wg show command for transfer metrics when dump command fails
Add read_transfer_totals_from_show function to parse transfer statistics from wg show output as fallback when wg show dump command fails. Add parse_human_wireguard_bytes helper to convert human-readable byte values (B, KiB, MiB, GiB, TiB) to u64. Update read_transfer_totals to call fallback instead of returning error when dump command fails.
2026-03-18 09:59:44 +01:00
d032950dfb refactor: replace metrics-based tunnel status check with direct status command in is_active function
Replace metrics query in is_active with direct tunnel_backend status command call to avoid unnecessary metrics overhead when only checking tunnel state. Parse status command stdout and compare against "active" string case-insensitively. Add Windows CREATE_NO_WINDOW flag to status command execution.
2026-03-18 09:56:42 +01:00
3d70655cfa feat: add fallback tunnel status check and improve Windows service command calls
Add fallback to tunnel_status when metrics query fails in current_metrics function, returning zero bytes with actual tunnel state. Update waitForTunnelStatus in frontend to use tunnel_status instead of tunnel_metrics for status polling and refresh metrics separately on success. Change CloseRequested window event handler to call app_handle().exit(0) instead of no-op. Replace "sc" with "sc.exe" in all Windows service command
2026-03-18 09:53:46 +01:00
eff143d5b3 refactor: remove direct Windows metrics from tunnel_manager and update wg.exe fallback in tunnel-helper
Remove direct_windows_metrics, read_windows_metrics_from_show, parse_human_wireguard_bytes, and find_windows_wg functions from tunnel_manager.rs to rely on bundled backend for all metrics queries. Update find_wg_cli in tunnel-helper to return "wg.exe" as fallback when WireGuard installation paths don't exist, removing "wg" from candidate list.
2026-03-18 09:49:20 +01:00