Commit Graph

27 Commits

Author SHA1 Message Date
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
c921e86a11 feat: enable static_secrets feature for x25519-dalek in desktop client
Add static_secrets feature flag to x25519-dalek dependency to support deterministic key generation from seed material.
2026-03-17 19:40:56 +01:00
210cf3b4f4 fix: add clang-cl wrapper script and update Windows build to ensure clang availability
Add clang-cl wrapper script that invokes clang in MSVC-compatible mode with availability check and helpful error message. Update Linux Windows build script to make clang-cl wrapper executable and include scripts directory in PATH for both cargo-xwin and clang-cl resolution.
2026-03-17 19:39:51 +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
61d2b4b25c feat: add branding assets and favicon support across admin-web and desktop-client
Add NexaVPN logo images (full logo and mark-only variants) to admin-web and desktop-client public directories. Add favicon.ico and favicon.png to admin-web, and icon.png to desktop-client. Update index.html files to reference favicon assets. Add icon.png and icon.ico to desktop-client Tauri icons directory and configure bundle.icon in tauri.conf.json. Update Layout component to display logo in sidebar brand-block with
2026-03-17 19:37:58 +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
7902e772bf docs: add clang/lld/llvm prerequisites for Linux Windows cross-builds
Add apt install instructions for clang, lld, llvm, and nsis to README Ubuntu-to-Windows build section. Add clang-cl availability check to cargo-xwin wrapper script with helpful error message directing users to install LLVM/Clang toolchain when missing.
2026-03-17 19:29:37 +01:00
39e70ec526 fix: use PATH-based cargo-xwin resolution instead of direct wrapper path
Update Linux Windows build script to add scripts directory to PATH and reference cargo-xwin by name rather than direct path to wrapper script, improving compatibility with Tauri's runner resolution mechanism.
2026-03-17 19:26:36 +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
61e6213b67 fix: use cargo-xwin wrapper script to resolve Tauri runner compatibility
Add cargo-xwin wrapper script that invokes `cargo xwin` subcommand and update Linux Windows build script to use wrapper as --runner instead of cargo-xwin binary name directly. Add chmod +x to ensure wrapper is executable before build.
2026-03-17 19:25:04 +01:00
cfe38e5c3b chore: update Tauri dependencies to 2.10.1 and tauri-build to 2.5.5
Update @tauri-apps/api and @tauri-apps/cli to version 2.10.1, and tauri runtime to 2.10.1 for consistency across desktop client dependencies. Update tauri-build to version 2.5.5.
2026-03-17 19:23:12 +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
ebc449079b chore: update Tauri dependencies to 2.3.1
Update @tauri-apps/api, @tauri-apps/cli, and tauri-build to version 2.3.1 for consistency across desktop client dependencies.
2026-03-17 19:20:55 +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
991df88d58 refactor: migrate Windows target from x86 to x64 architecture
Update all Windows build configurations, scripts, and documentation from i686-pc-windows-msvc (x86) to x86_64-pc-windows-msvc (x64). Update npm scripts, build-tunnel-helper.sh target validation, bundled helper paths, and tunnel manager strategy references. Add XWIN_ARCH=x86_64 environment variable to Linux cross-build command and --xwin-arch flag to cargo xwin invocation.
2026-03-17 19:13:56 +01:00
8d8a3a7859 fix: check cargo-xwin availability using subcommand instead of binary name
Change cargo-xwin detection from `command -v cargo-xwin` to `cargo xwin --version` to properly verify cargo subcommand availability on Linux systems cross-compiling to Windows targets.
2026-03-17 19:08:51 +01:00
84be690a50 docs: add Linux cross-build instructions for Windows x86 NSIS installer
Add Ubuntu-to-Windows build workflow using cargo-xwin for i686-pc-windows-msvc target. Update build-tunnel-helper.sh with host OS detection, target validation, and cargo-xwin support for Linux cross-compilation. Add tauri.windows.conf.json to configure NSIS-only bundle output and npm script for Linux-based Windows builds. Update client-platforms.md to document cross-compilation support and clarify that MSI packaging still requires Windows environment.
2026-03-17 19:03:50 +01:00
5242c780e4 feat: add GatewayBootstrapToken configuration field
Add GatewayBootstrapToken field to Config struct and load from GATEWAY_BOOTSTRAP_TOKEN environment variable with default value "nexavpn-gateway-bootstrap".
2026-03-17 18:57:49 +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
a197fb5bb6 fix: cast username and email to text in user repository queries
Add explicit ::text casts to username and email columns in List and Create queries to ensure proper type handling when scanning values from PostgreSQL. Update Create query to return role_id and role_name, adjusting Scan to match all returned fields.
2026-03-16 06:37:23 +01:00
88b814638b fix: cast vpn_cidr to text in gateway repository queries
Add explicit ::text cast to vpn_cidr column in List, FirstActive, and Update queries to ensure proper type handling when scanning CIDR values from PostgreSQL.
2026-03-16 06:36:35 +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
7c4bba1021 chore: add Vite client type reference for admin web
Add vite-env.d.ts with Vite client types reference to enable TypeScript support for Vite-specific features and environment variables in the admin web application.
2026-03-15 16:43:39 +01:00
3289da24af refactor: update module path from github.com/nexavpn/nexavpn/backend to nexavpn/backend
Update go.mod module declaration and all internal imports across the backend codebase to use simplified nexavpn/backend path instead of full GitHub URL.
2026-03-15 16:42:25 +01:00
8f73dd3321 refactor: move Claims type from auth to new identity package
Extract Claims struct from auth/types.go into dedicated identity package for better separation of concerns. Update all imports and usages across auth service, token handling, and request context utilities.
2026-03-15 16:39:02 +01:00
298d301ce8 refactor: extract request context utilities into dedicated package
Move ClaimsFromContext and MustUserID helpers from httpserver to new requestctx package for better separation of concerns. Update all imports across auth, device, policy, and user handlers. Fix Dockerfile to copy go.sum and run go mod tidy before download.
2026-03-15 16:37:01 +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