### Install Rustup Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/nym-vpn-lib/README.md Install Rustup, the Rust toolchain installer, using the provided curl command. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### Install Make on Windows Source: https://github.com/nymtech/nym-vpn-client/blob/develop/wireguard/README.md Installs the GNU Make utility on Windows using winget. ```sh winget install -e --id GnuWin32.Make ``` -------------------------------- ### Run Full Tauri App in Development Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/CLAUDE.md Use this command to start the complete NymVPN desktop application in development mode. This requires the Rust toolchain to be installed. ```sh npm run dev:app ``` -------------------------------- ### Install Xcode Command Line Tools Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Install Xcode Command Line tools if you do not have Xcode installed. Verify the installation path afterwards. ```sh xcode-select --install ``` ```sh xcode-select -p ``` -------------------------------- ### Install GNU Make on Windows Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Install GNU Make using winget on Windows. ```bat winget install -e --id=GnuWin32.Make ``` -------------------------------- ### Install Go on Linux Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Install Go from the official Go downloads page for Linux development. ```sh Install Go from https://go.dev/dl/ ``` -------------------------------- ### Install Protobuf on macOS Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Install Protobuf using Homebrew on macOS. ```sh brew install protobuf ``` -------------------------------- ### Install Windows Driver Kit (WDK) Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Install the Windows Driver Kit using winget. This is a vital step even if WDK is installed via Visual Studio. ```bat winget install --id Microsoft.WindowsWDK.10.0.26100 ``` -------------------------------- ### Install Golang on macOS Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Install Golang using Homebrew on macOS. ```sh brew install go ``` -------------------------------- ### Install Windows Driver Kit Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-windows/split-tunnel-driver/BUILD.md Use winget to install the complete Windows Driver Kit. This is required for configuring the driver. ```bash winget install --id Microsoft.WindowsWDK.10.0.26100 ``` -------------------------------- ### Install cargo-get Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Install the `cargo-get` utility, which might be used for managing Cargo configurations or dependencies. ```sh cargo install cargo-get ``` -------------------------------- ### Install Go for Android Build Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/nym-vpn-lib/README.md Use Homebrew to install Go, a prerequisite for building the Nym VPN Lib on Android. ```bash brew install go ``` -------------------------------- ### Install Nym VPN on Debian/Ubuntu Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/README.md Import the Nym repository and install the nym-vpn package using apt. ```shell wget https://apt.nymtech.net/pool/main/n/nym-repo-setup/nym-repo-setup_1.0.1_amd64.deb -O /tmp/nym-repo-setup_1.0.1_amd64.deb sudo dpkg -i /tmp/nym-repo-setup_1.0.1_amd64.deb sudo apt install nym-vpn ``` -------------------------------- ### Install Dependencies and Build Tauri App Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/docs/build.md Run npm install, create a dist directory, and then build the Tauri application. Use the --help flag to see build options. ```shell # if needed npm i mkdir dist ``` ```shell npm run tauri build ``` ```shell npm run tauri build -- --help ``` -------------------------------- ### Install Protobuf Compiler on Linux Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Install the latest protobuf-compiler from its GitHub releases page for Linux development. ```sh Install the latest protobuf-compiler from https://github.com/protocolbuffers/protobuf/releases ``` -------------------------------- ### Download Debian ISO and Create Disk Image Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/docs/BUILD_OS_IMAGE.md Downloads the Debian ISO and creates a qcow2 disk image for a virtual machine. Ensure QEMU is installed. ```bash wget -O debian.iso https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.5.0-amd64-netinst.iso qemu-img create -f qcow2 ./debian.qcow2 5G qemu-system-x86_64 -cpu host -accel kvm -m 8192 -smp 8 -cdrom debian.iso -drive file=./debian.qcow2 ``` -------------------------------- ### Install MSYS2 and GCC/Clang for Windows Source: https://github.com/nymtech/nym-vpn-client/blob/develop/wireguard/README.md Installs MSYS2, updates its components, and installs GCC and Clang compilers for x64 and arm64 architectures within the MSYS2 environment. ```sh pacman -Suy pacman -S --needed mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc pacman -S mingw-w64-clang-x86_64-clang pacman -S mingw-w64-clang-aarch64-clang pacman -S mingw-w64-clang-aarch64-headers mingw-w64-clang-aarch64-crt-git ``` -------------------------------- ### Install Visual Studio and VC Build Tools on Windows Source: https://github.com/nymtech/nym-vpn-client/blob/develop/wireguard/README.md Installs Visual Studio Community Edition with necessary C++ build tools for x64 and arm64 architectures using winget. ```sh winget install --id Microsoft.VisualStudio.2022.Community --override "--wait --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended --add Microsoft.VisualStudio.Component.VC.Tools.ARM64" ``` -------------------------------- ### Install Dependencies for Linux Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/test-manager/LOCAL_DEVELOPMENT.md This script installs the necessary dependencies for running the Nym VPN client on a Linux development environment. ```bash ../scripts/install_deps_linux.sh ``` -------------------------------- ### Install cargo-ndk Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/nym-vpn-lib/README.md Install cargo-ndk, a Cargo extension that simplifies building Rust projects for Android. ```bash cargo install cargo-ndk ``` -------------------------------- ### Install Nym VPN App Dependencies Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/README.md Install project dependencies using npm. This command should be run in the nym-vpn-app directory. ```shell npm i ``` -------------------------------- ### Get Nym VPN App Help (CLI) Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/README.md Display help information for the nym-vpn-app command-line interface. ```shell nym-vpn-app --help ``` -------------------------------- ### Start Debian VM with VNC over SSH Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/docs/REMOTE_MANAGEMENT.md Use this command to start a Debian 11 VM as the 'test' user, forwarding the VNC server port via SSH. Replace placeholders with your server's details. Remove '-snapshot' to make changes permanent. ```bash ssh -L 5933:127.0.0.1:5933 -tt $SSH_HOST "sudo -u test bash -c 'cd $TEST_APP_PATH; cargo run --bin test-manager run-vm debian11 --vnc 5901 -snapshot'" ``` -------------------------------- ### Install Linux System Dependencies Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Install essential system dependencies for Linux development, including libraries for D-Bus, MNL, and NFTNL. ```sh sudo apt install libdbus-1-dev libmnl-dev libnftnl-dev ``` -------------------------------- ### Build NSIS Installer Bundle on Windows Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/docs/build.md To create an NSIS installer on Windows, ensure the nym-vpnd binary and its required DLLs are present in the src-tauri directory before running the build command with the --bundles nsis flag. ```shell npm run tauri build -- --bundles nsis ``` -------------------------------- ### Install Libclang for Windows Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Install Libclang for x86 or x64 using winget. For ARM64, download from the LLVM releases page and set LIBCLANG_PATH. ```bat winget install -e --id=LLVM.LLVM ``` -------------------------------- ### Install Nym VPN App on Arch Linux Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/README.md Install the nym-vpn-app and nym-vpnd packages from the AUR using yay. Pre-built binaries are also available. ```shell yay -S nym-vpn-app nym-vpnd # Also available as pre-built binaries # yay -S nym-vpn-app-bin nym-vpnd-bin ``` -------------------------------- ### Verify Protobuf Compiler Installation on Windows Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Check if the `protoc` command is recognized in the command prompt after setting the environment variables. ```cmd protoc --version ``` -------------------------------- ### Complete Test Manager Configuration with VMs Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/test-manager/docs/config.md A comprehensive configuration example including definitions for a Debian 12 VM and a Windows 11 VM, along with test location settings and Mullvad host. ```json { "test_locations": [ { "test_wireguard_over_shadowsocks": ["se-got"] }, { "test_multihop": ["se-got"] }, { "test_quantum_resistant_tunnel": ["se-got"] }, { "test_quantum_resistant_multihop_udp2tcp_tunnel": ["se-got"] }, { "test_quantum_resistant_multihop_shadowsocks_tunnel": ["se-got"] }, { "test_ui_tunnel_settings": ["se-got"] }, { "*": ["se", "no", "fi", "dk"] } ], "mullvad_host": "stagemole.eu", "vms": { "debian12": { "vm_type": "qemu", "image_path": "$VM_IMAGES/debian12.qcow2", "os_type": "linux", "package_type": "deb", "architecture": "x64", "provisioner": "ssh", "ssh_user": "test", "ssh_password": "test", "disks": [], "artifacts_dir": "/opt/testing", "tpm": false }, "windows11": { "vm_type": "qemu", "image_path": "$VM_IMAGES/windows11.qcow2", "os_type": "windows", "package_type": null, "architecture": "x64", "provisioner": "noop", "ssh_user": null, "ssh_password": null, "disks": ["$TESTRUNNER_IMAGES/windows-test-runner.img"], "artifacts_dir": "E:\\", "tpm": false } } } ``` -------------------------------- ### Install Tauri CLI Globally Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/README.md Install the Tauri CLI globally using cargo if you prefer to run tauri commands directly. ```shell cargo install tauri-cli@^2.3.0 cargo tauri help ``` -------------------------------- ### Start Nym VPN Service on Arch Linux Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/README.md Enable and start the nym-vpnd service to ensure the VPN service runs automatically on boot. ```shell sudo systemctl enable --now nym-vpnd.service ``` -------------------------------- ### Install cargo-swift for iOS Development Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Install `cargo-swift` version 0.11.1, which is compatible with uniffi 0.31.1, for iOS development. ```sh cargo install cargo-swift@0.11.1 ``` -------------------------------- ### Windows Environment Variables Setup Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-android/README.md Sets up essential environment variables for Android development on Windows, including JAVA_HOME, ANDROID_HOME, and ANDROID_NDK. Also configures the system PATH. ```powershell JAVA_HOME: C:\\Program Files\\Android\\Android Studio\\jbr ANDROID_HOME: %LOCALAPPDATA%\\Android\\Sdk ANDROID_NDK: %ANDROID_HOME%\\ndk\\29.0.14206865 (or whatever version you have installed) Add to %PATH%: %JAVA_HOME%\\bin %ANDROID_HOME%\\emulator %ANDROID_HOME%\\cmdline-tools\\bin (or ...\\cmdline-tools\\latest\\bin if you installed the latest version) %ANDROID_HOME%\\platform-tools ``` -------------------------------- ### Install Chromium for Playwright Source: https://github.com/nymtech/nym-vpn-client/blob/develop/tests/webrtc-tests/README.md Installs the Chromium browser required for Playwright automation. Run this before executing the WebRTC leak test locally. ```bash cd webrtc-tests npx playwright install chromium ``` -------------------------------- ### Install Nightly Rust and Rustfmt Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Installs the nightly Rust toolchain along with rustfmt for code formatting. This is required for maintaining code style consistency. ```sh rustup toolchain install nightly -c rustfmt ``` -------------------------------- ### Install Nym VPN App via Flatpak Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/README.md Install the Nym VPN client application from Flathub using the flatpak command. ```shell flatpak install flathub net.nymtech.NymVPN ``` -------------------------------- ### Create Windows 11 Disk Image Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/docs/BUILD_OS_IMAGE.md Creates a qcow2 disk image for a Windows 11 VM with at least 64GB of space. This is a prerequisite for installing Windows 11. ```bash mkdir -p os-images qemu-img create -f qcow2 ./os-images/windows11.qcow2 64G ``` -------------------------------- ### Example leaktest.settings Configuration Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-windows/split-tunnel-driver/leaktest/README.md This configuration file sets essential parameters for the leak testing tool, including network interface names and TCP/UDP ports for the test server. ```ini TunnelAdapter=Mullvad LanAdapter=Ethernet TcpBinServerIp=1.2.3.4 TcpBinEchoPort=30000 TcpBinEchoPortUdp=40000 ``` -------------------------------- ### Add Android Targets to Rust Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-android/README.md Installs the necessary Android targets for Rust compilation. Ensure Rust is installed and configured. ```sh rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android ``` -------------------------------- ### Enable SSH Service Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/docs/BUILD_OS_IMAGE.md Enables the SSH service to start automatically on boot. This is necessary for remote access to the virtual machine. ```bash systemctl enable sshd.service ``` -------------------------------- ### Install MSYS2 Dependencies for Windows Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-android/README.md Installs required packages (rsync and patch) for NymVPN Android builds on Windows using MSYS2. ```sh pacman -S rsync patch ``` -------------------------------- ### Install Cargo Dependencies Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-android/README.md Installs essential Cargo tools for building Android applications. These tools are required for managing dependencies and licenses. ```sh cargo install cargo-ndk cargo-license ``` -------------------------------- ### Run Nym VPN App in Development Mode (npm) Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/README.md Start the Nym VPN app in development mode using npm. Adjust the RUST_LOG environment variable for desired log levels. ```shell RUST_LOG=info,nym_vpn_app=trace npm run dev:app ``` -------------------------------- ### Install iOS Rust Targets Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Add the necessary Rust targets for iOS development to your Rust toolchain. ```sh rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios ``` -------------------------------- ### Run Vite Dev Server Only Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/CLAUDE.md This command starts only the Vite development server for the frontend, without the Tauri shell. Useful for rapid frontend iteration. ```sh npm run dev ``` -------------------------------- ### Configure SWTPM for Windows 11 VM Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/docs/BUILD_OS_IMAGE.md Sets up the emulator SWTPM for the virtual TPM required by Windows 11. This command starts the TPM emulator and creates a socket for communication. ```bash mkdir -p .tpm swtpm socket -t --ctrl type=unixio,path=".tpm/tpmsock" --tpmstate ".tpm" --tpm2 -d ``` -------------------------------- ### Build Nym VPN App Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/README.md Build the Nym VPN application. This involves installing dependencies, creating a dist directory, and running the tauri build command. ```shell cd nym-vpn-app npm i mkdir dist npm run tauri build ``` -------------------------------- ### Build Nym VPN Core for Android with Docker Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Builds the Nym VPN core for Android using Docker. Ensure Docker is installed. ```sh make -C nym-vpn-core/ -f Android.mk DOCKER=true ``` -------------------------------- ### Per-Test Relay Selection Example Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/test-manager/docs/config.md Illustrates how to specify custom relay locations for specific tests using glob patterns. The first matching pattern determines the location. ```json { // other fields "test_locations": [ { "*daita*": ["se-got-wg-001", "se-got-wg-002"] }, { "*": ["se"] } ] } ``` -------------------------------- ### Update AppImage and vpnd Versions in Linux Installer Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/docs/update_linux_installer.md Bump the `app_tag`, `app_version`, `vpnd_tag`, and `vpnd_version` variables in the `.pkg/linux/install` script to reflect the new stable release. This is a prerequisite before pushing changes to the develop branch. ```bash # AppImage app_tag=nym-vpn-app-v1.2.3 app_version=1.2.3 # ⠐ ⠐ ⠐ # nym-vpnd vpnd_tag=nym-vpn-core-v1.2.3 vpnd_version=1.2.3 ``` -------------------------------- ### Run Nym VPN App in Development Mode on Windows (npm) Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/README.md Start the Nym VPN app in development mode on Windows using PowerShell. Logs can be set via environment variables or CLI flags. ```powershell $env:RUST_LOG='debug,nym_vpn_app=trace'; npm run dev:app; $env:RUST_LOG=$null # or using cli flag -L npm run dev:app -- -- -- -Ltrace ``` -------------------------------- ### Create Windows 10 Disk Image and Launch VM Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/docs/BUILD_OS_IMAGE.md Creates a qcow2 disk image for a Windows 10 VM and launches the QEMU system emulator. Replace '' with the actual path to your Windows 10 ISO file. ```bash mkdir -p os-images qemu-img create -f qcow2 ./os-images/windows10.qcow2 32G qemu-system-x86_64 -cpu host -accel kvm -m 4096 -smp 2 -cdrom -drive file=./os-images/windows10.qcow2 ``` -------------------------------- ### Run Daemon with Debug Logs Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-apple/README.md To enable detailed logging for the NymVPN daemon, first remove any existing installations, kill the process, and then run the helper executable with the RUST_LOG environment variable set to 'debug'. Ensure the executable has execute permissions. ```shell chmod +x ./net.nym.vpn.helper sudo RUST_LOG=debug ./net.nym.vpn.helper ``` -------------------------------- ### Run Nym VPN App in Development Mode (cargo) Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/README.md Start the Nym VPN app in development mode using cargo tauri dev. Adjust the RUST_LOG environment variable for desired log levels. ```shell cd src-tauri RUST_LOG=info,nym_vpn_app=trace cargo tauri dev ``` -------------------------------- ### Launch Windows 11 VM with UEFI and TPM Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/docs/BUILD_OS_IMAGE.md Launches the QEMU system emulator for Windows 11, enabling UEFI, secure boot, and the virtual TPM. Ensure OVMF firmware and the SWTPM socket are correctly configured. ```bash cp /usr/share/OVMF/OVMF_VARS.secboot.fd . qemu-system-x86_64 -cpu host -accel kvm -m 4096 -smp 2 -cdrom -drive file=./os-images/windows11.qcow2 \ -tpmdev emulator,id=tpm0,chardev=chrtpm -chardev socket,id=chrtpm,path=".tpm/tpmsock" -device tpm-tis,tpmdev=tpm0 \ -global driver=cfi.pflash01,property=secure,value=on \ -drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.secboot.fd,readonly=on \ -drive if=pflash,format=raw,unit=1,file=./OVMF_VARS.secboot.fd \ -machine q35,smm=on ``` -------------------------------- ### Run Tests on Ubuntu/Debian with KVM Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/test-manager/LOCAL_DEVELOPMENT.md Execute the end-to-end test suite on a local machine with KVM-compliant qemu. This involves building binaries on the developer machine and running tests within a guest VM. ```bash ./test.sh run-tests ``` ```bash ./test.sh configure ``` -------------------------------- ### Build Nym VPN Core Binaries Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/README.md Execute this script from the repository root to perform a full containerized build, producing Linux x86_64 binaries. ```bash # Full containerized build (recommended, produces Linux x86_64 binaries) # From the repo root: ./nym-vpn-core/crates/test/test-manager/test_macos.sh ``` -------------------------------- ### Manual Build Script for WireGuard-Go on Windows Source: https://github.com/nymtech/nym-vpn-client/blob/develop/wireguard/README.md Executes the build script for wireguard-go, with an option to specify the arm64 architecture. ```sh ./build-wireguard-go.sh # or for arm64: ./build-wireguard-go.sh --arm64 ``` -------------------------------- ### Run Tauri Commands Locally Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/README.md Execute Tauri CLI commands using the locally installed package. This avoids the need for a global installation. ```shell npm run tauri help ``` -------------------------------- ### Automatic Build of libwg on Windows Source: https://github.com/nymtech/nym-vpn-client/blob/develop/wireguard/README.md Builds the libwg (wireguard-go) library, downloads wintun, and compiles winfw using the Windows Makefile. ```sh cd nym-vpn-core make -f Windows.mk ``` -------------------------------- ### Build Full Desktop App Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/CLAUDE.md This command builds the complete NymVPN desktop application, including the Tauri shell and the bundled frontend. ```sh npm run build:app ``` -------------------------------- ### Bypass Network Requirement during Windows Install Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/docs/BUILD_OS_IMAGE.md A command to bypass the network requirement during Windows installation, allowing the creation of a local account when prompted. This is executed via Shift+F10 command prompt. ```bash oobe\BypassNRO ``` -------------------------------- ### Build Wireguard for Desktop (Linux/macOS) Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Builds the wireguard-go component for desktop use on Linux and macOS. This command should be run from the repository root. ```sh make build-wireguard ``` -------------------------------- ### Build Specific Components on Windows Source: https://github.com/nymtech/nym-vpn-client/blob/develop/wireguard/README.md Builds individual components (libwg, wintun, or winfw) using the Windows Makefile by specifying a command. ```sh make -f Windows.mk ``` -------------------------------- ### Configure Build Environment for Manual Build Source: https://github.com/nymtech/nym-vpn-client/blob/develop/wireguard/README.md Sets up the PATH environment variable to include Go, Visual Studio Build Tools, and specific MSVC compiler paths for cross-compilation on Windows. ```sh HOST_ARCH="arm64" TARGET_ARCH="arm64" export PATH="$PATH:/c/Program Files/Go/bin" export PATH="$PATH:/c/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin" export PATH="$PATH:/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34808/bin/Host$HOST_ARCH/$TARGET_ARCH" ``` -------------------------------- ### Build Nym VPN Core (macOS, Linux, Windows) Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Builds the VPN daemon and proxy for macOS, Linux, and Windows using Cargo. Use '--release' for optimized builds. ```sh cd nym-vpn-core/ # build only the the vpn daemon cargo build -p nym-vpnd -p nym-socks5-proxy --release # build all cargo build --release ``` -------------------------------- ### Amnezia Configuration Presets Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/nym-wg-go/README.md Use predefined Amnezia configurations for different levels of privacy and compatibility. These helpers simplify the setup of Amnezia configurations. ```rust /// Disabled Amnezia Configuration, i.e. run as normal wireguard. let _ = AmneziaConfig::OFF; /// Enables only the minimum Amnezia features, while ensuring compatibility with plain /// wireguard peers. let _ = AmneziaConfig::BASE; /// Creates a randomized configuration with parameters within suggested ranges. let _ = AmneziaConfig::rand(rand::thread_rng()); ``` -------------------------------- ### Build Wireguard Library Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/nym-wg-go/README.md Build the wireguard-go library and header files. This is a prerequisite for using the nym-wg-go crate. ```sh # In the root of the repo make build-wireguard ``` -------------------------------- ### Build Windows VPN Core Components Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Builds the necessary components for the Nym VPN on Windows, including `winfw` and `libwg`, and downloads `wintun`. This command must be run from a Visual Studio Developer PowerShell within the `nym-vpn-core` directory. The `RELEASE=1` flag builds release binaries, otherwise debug binaries are built. ```pwsh cd nym-vpn-core make -f Windows.mk RELEASE=1 PWSH=1 ``` -------------------------------- ### Build WireGuard-Go Dependency for Android Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/nym-vpn-lib/README.md Navigate to the nym-vpn-lib directory and execute the build script for the wireguard-go dependency, specifying the Android toolchain. ```bash cd nym-vpn-lib NDK_TOOLCHAIN_DIR="$ANDROID_NDK_HOME/toolchains/llvm/prebuilt//bin" ../wireguard/build-wireguard-go.sh --android ``` -------------------------------- ### Protoc Compilation for macOS GRPC Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-apple/README.md Compile .proto files using protoc to generate Swift and gRPC Swift code. Ensure swift-protobuf and grpc-swift are installed via Homebrew. ```shell protoc --swift_out=. vpn.proto protoc --grpc-swift_out=. vpn.proto ``` -------------------------------- ### Build Debian and AppImage Bundles on Linux Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/docs/build.md Execute the Tauri build command with the --bundles flag to generate deb and AppImage packages for Linux. ```shell npm run tauri build -- --bundles deb,appimage ``` -------------------------------- ### Create Server Transports for Serial Communication Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/test-manager/message_flow_context.md On the VM side, this function creates two logical channels from a single serial stream, mirroring the host's setup for serial communication. ```rust let (runner_transport, mullvad_daemon_transport, ...) = create_server_transports(serial_stream); ``` -------------------------------- ### Cross-Compile Windows Components for ARM64 Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Cross-compiles the Nym VPN Windows components for the ARM64 architecture from an x64 machine. This command requires a Visual Studio Developer PowerShell and should be executed from the `nym-vpn-core` directory. Use `RELEASE=0` for debug builds and `RELEASE=1` for release builds. ```pwsh cd nym-vpn-core make -f Windows.mk CPU_ARCH=ARM64 RELEASE=0 PWSH=1 ``` -------------------------------- ### Run Tests on MacOS with Exoscale Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/test-manager/LOCAL_DEVELOPMENT.md Execute the end-to-end test suite on MacOS using Exoscale for remote VM provisioning. This is necessary when KVM is not available on the host machine. ```bash ./test_macos.sh ``` -------------------------------- ### Filter Windows Security Events by Destination IP Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Example XML query to filter Windows Security Events in Event Viewer for a specific destination IP address. This can be used to create custom views. ```xml ``` -------------------------------- ### Build and Sign nym-vpnd for Development Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Builds the workspace and signs the nym-vpnd daemon with the required entitlements for development on macOS. This command should be executed from the 'nym-vpn-core' directory. ```bash make -f macOS.mk build-dev ``` -------------------------------- ### Build Nym VPN Core for Windows ARM64 Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Builds the Nym VPN core for Windows ARM64 from an x64 host. Ensure dependencies are built using 'Windows.mk' first. ```pwsh cargo build --release --target aarch64-pc-windows-msvc ``` -------------------------------- ### List Linux Firewall Rules Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Use this command to display the current nftables ruleset on Linux systems. ```bash sudo nft list ruleset ``` -------------------------------- ### Take Windows WFP State Snapshot Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Capture a snapshot of the Windows Filtering Platform state, including all registered filters, using the netsh command. This output can be verbose. ```bat netsh wfp show state ``` -------------------------------- ### Build Rust Backend Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/CLAUDE.md Compiles the Rust backend code located in the 'src-tauri/' directory. ```sh cargo build ``` -------------------------------- ### Set PROTOC and PATH environment variables on Windows Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Set the PROTOC environment variable to the protoc executable path and add the protoc bin directory to the system PATH. ```bat setx PROTOC "C:\Program Files\protoc\bin\protoc.exe" /M ``` ```bat setx PATH "%PATH%;C:\Program Files\protoc\bin" /M ``` -------------------------------- ### Build Frontend Only Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/CLAUDE.md Compiles the frontend code using TypeScript and Vite, outputting the build artifacts to the 'dist/' directory. ```sh npm run build ``` -------------------------------- ### Build Release Targets for Android Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/nym-vpn-lib/README.md Use cargo-ndk to build the Nym VPN Lib for multiple Android architectures in release mode. Specify the output path using the -o flag. ```bash cargo ndk -t armeabi-v7a -t arm64-v8a -t i686-linux-android -t x86_64-linux-android -o build --release ``` -------------------------------- ### Build Nym VPN Core for iOS Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Builds the Nym VPN core for iOS on a macOS host using the provided Makefile. ```sh make -C nym-vpn-core/ -f iOS.mk ``` -------------------------------- ### Test Mobile Device Simulation Locally Source: https://github.com/nymtech/nym-vpn-client/blob/develop/tests/webrtc-tests/README.md Runs the WebRTC leak test with mobile device simulation enabled. This helps test how leaks might occur on mobile devices. ```bash WEBRTC_MOBILE=true node webrtc-leak-test.js ``` -------------------------------- ### Build Nym VPN Core for Android (Direct) Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md Builds the Nym VPN core for Android directly. Requires setting ANDROID_NDK_HOME and NDK_TOOLCHAIN_DIR environment variables. ```sh # linux export ANDROID_NDK_HOME="/opt/android/android-ndk-r28c" export NDK_TOOLCHAIN_DIR="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin" # macos export ANDROID_NDK_HOME=~/Library/Android/sdk/ndk/28.0.12433566 export NDK_TOOLCHAIN_DIR=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/darwin-x86_64/bin make -C nym-vpn-core/ -f Android.mk ``` -------------------------------- ### Build nym-wg-go Crate Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/nym-wg-go/README.md Build the nym-wg-go library. This command can be used when building the library itself or downstream projects that depend on it. ```sh # build this library (or downstream projects) cargo build -p nym-wg-go ``` -------------------------------- ### Enable System Integrity Protection (SIP) Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/README.md After completing development and testing, it is crucial to re-enable System Integrity Protection for security. This command is run in recovery mode. ```bash csrutil enable ``` -------------------------------- ### Run All Pre-Commit Checks Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/CLAUDE.md Executes all standard checks before committing, including ESLint, TypeScript type-checking, and Prettier formatting checks. ```sh npm run check ``` -------------------------------- ### Run ESLint for Linting Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-app/CLAUDE.md Lints the JavaScript and TypeScript code in the 'src/' directory using ESLint. ```sh npm run lint ``` -------------------------------- ### Open Serial Connection on Host Source: https://github.com/nymtech/nym-vpn-client/blob/develop/nym-vpn-core/crates/test/test-manager/message_flow_context.md Opens a serial connection to the VM's PTY on the host side, establishing the physical communication link. ```rust let serial_stream = tokio_serial::SerialStream::open(pty_path); ```