### Installation Bundle Configuration Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Configures the installation prefix to create a relocatable bundle and sets up directories for data and libraries within the bundle. ```cmake # === Installation === # By default, "installing" just makes a relocatable bundle in the build # directory. set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() # Start with a clean build bundle directory every time. install(CODE " file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") " COMPONENT Runtime) set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") ``` -------------------------------- ### Install Application Executable and Data Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Installs the main application executable to the bundle's root and installs Flutter ICU data to the data directory. ```cmake install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime) install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Install Flutter Assets Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Installs Flutter assets by first removing any existing directory and then copying the new assets. This ensures a clean installation of Flutter assets. ```cmake set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install( CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Python REPL Session Example Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/test/qa/README.md An example of a typical Python REPL session, demonstrating interaction with network and shell commands. ```python >>> network.stop() >>> sudo.ip.addr() 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 222: eth0@if223: mtu 1500 qdisc noqueue state DOWN group default link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0 valid_lft forever preferred_lft forever >>> sh.nordvpn.account() You are not logged in. ``` -------------------------------- ### Install New Python Package Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/test/qa/README.md Installs a new Python package using pip. ```bash python3 -m pip install ``` -------------------------------- ### Install rps Tool Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/BUILD.md Installs the 'rps' command-line tool globally using Dart's package manager. Ensure you have Dart SDK installed. ```bash dart pub global activate rps ``` -------------------------------- ### Install Flutter Library and Bundled Libraries Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Installs the main Flutter library and any bundled libraries provided by plugins into the bundle's library directory. ```cmake install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) install(FILES "${bundled_library}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endforeach(bundled_library) ``` -------------------------------- ### Meshnet Help Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.14.2_1659002211.md Type this command to access all Meshnet-related commands and get help. ```bash nordvpn meshnet ``` -------------------------------- ### Project-Level CMake Configuration Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Sets up the minimum CMake version, project name, binary name, and application ID. It also configures installation paths and build type. ```cmake cmake_minimum_required(VERSION 3.10) project(runner LANGUAGES CXX) set(BINARY_NAME "nordvpn-gui") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID set(APPLICATION_ID "com.nordvpn.nordvpn-gui") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. cmake_policy(SET CMP0063 NEW) # Load bundled libraries from the lib/ directory relative to the binary. set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") # Root filesystem for cross-building. if(FLUTTER_TARGET_PLATFORM_SYSROOT) set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) endif() # Define build configuration options. if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Flutter build mode" FORCE) set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Profile" "Release") endif() ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/test/qa/README.md Installs Python dependencies from a requirements file. The requirements.txt file is typically located at 'ci/docker/tester/requirements.txt'. ```bash python3 -m pip install -r ``` -------------------------------- ### Switch to NordLynx Technology Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.3.0_1564480800.md Use this command in the terminal to switch your NordVPN Linux client to the NordLynx protocol. Ensure WireGuard is installed first. ```bash nordvpn set technology NordLynx ``` -------------------------------- ### Install Native Assets Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Copies native assets provided by packages into the bundle's library directory. The directory is re-copied on each build to prevent stale files. ```cmake # Copy the native assets provided by the build.dart from all packages. set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") install(DIRECTORY "${NATIVE_ASSETS_DIR}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) # Fully re-copy the assets directory on each build to avoid having stale files ``` -------------------------------- ### Set NordVPN GUI Log Level (snap) Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/README.md Control the logging level for the NordVPN GUI application when installed via snap package. Set the NORDVPN_GUI_LOG_LEVEL environment variable before running the application. ```bash NORDVPN_GUI_LOG_LEVEL= nordvpn.nordvpn-gui ``` -------------------------------- ### Docker Compose Configuration for NordVPN and Ubuntu Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/ci/docker/nordvpn/README.md Defines a docker-compose setup for running NordVPN and an Ubuntu container that routes its traffic through the NordVPN service. ```yaml version: "3" services: nordvpn: image: nordvpn cap_add: - NET_ADMIN environment: - NORDVPN_LOGIN_TOKEN=0123456789abcdef command: nordvpn set technology openvpn && nordvpn connect ubuntu: image: ubuntu network_mode: service:nordvpn depends_on: - nordvpn ``` -------------------------------- ### Define Flutter Library and Headers Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/flutter/CMakeLists.txt Sets variables for the Flutter library path and header files. It also publishes these to the parent scope for use in the installation step. ```cmake set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") # Published to parent scope for install step. set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) ``` -------------------------------- ### Install AOT Library for Non-Debug Builds Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Conditionally installs the Ahead-Of-Time (AOT) compiled library. This is only performed when the build type is not 'Debug' to optimize release versions. ```cmake if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endif() ``` -------------------------------- ### Set NordVPN GUI Log Level (deb/rpm) Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/README.md Control the logging level for the NordVPN GUI application when installed via deb/rpm package. Set the NORDVPN_GUI_LOG_LEVEL environment variable before running the application. ```bash NORDVPN_GUI_LOG_LEVEL= nordvpn-gui ``` -------------------------------- ### Check NordVPN Version Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.10.0_1622032586.md Use this command to check the currently installed NordVPN version on your Linux system. Alternative commands `nordvpn --version` and `nordvpn -v` are also available. ```bash nordvpn version ``` -------------------------------- ### Set Script Options for Error Handling Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/ci/README.md Always start shell scripts with 'set -euo' to ensure strict error handling and variable usage. ```bash set -euo ``` -------------------------------- ### Watch for Code Generation Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/BUILD.md Starts a background process that automatically regenerates code when changes are detected in files using Riverpod annotations. This is useful for continuous development. ```bash dart run build_runner watch ``` -------------------------------- ### Generate Test Coverage Report Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/BUILD.md Generates code coverage information for tests. Requires 'genhtml' to be installed to produce an HTML report from the coverage data. ```bash rps test cov ``` -------------------------------- ### Build Application Binaries Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/BUILD.md Use this command to build binaries for tools like 'checkelf' and 'downloader' located in the 'cmd/' directory. The output binary will be placed in the 'bin/' directory. ```shell go build -o "bin/" "cmd/" ``` -------------------------------- ### Run Unit Tests for a Single Package Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/TESTING.md Navigate to the specific package directory and use the 'go test' command to run unit tests for that package. ```bash cd nordvpn-app/meshnet go test ``` -------------------------------- ### Connect to VPN with NordLynx Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.3.0_1564480800.md After setting the technology to NordLynx, use this command to establish a VPN connection. ```bash nordvpn c ``` -------------------------------- ### Enable NordLynx Technology Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.4.0_1571652129.md Use this command to switch to NordLynx, the fast, secure, and private VPN connection technology. No separate WireGuard package download is required. ```bash nordvpn set technology nordlynx ``` -------------------------------- ### Configure Firewall Mark Setting Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.15.0_1666000343.md Set the `fwmark` configuration parameter using the `nordvpn set fwmark` command. Consult `nordvpn set fwmark --help` for available options. ```bash nordvpn set fwmark ``` -------------------------------- ### Build NordVPN Docker Image Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/ci/docker/nordvpn/README.md Builds the NordVPN Docker image using a specified version. The 'version' argument sets the NordVPN version from APT. ```dockerfile docker build -f ci/docker/nordvpn/Dockerfile -t nordvpn --build-arg version=x.x.x ci/docker ``` -------------------------------- ### Build QA-Peer Docker Image Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/ci/docker/qa-peer/README.md This command builds the QA-Peer Docker image, tagging it with a specified version and using the Dockerfile located in the CI directory. It's used to create custom image versions for testing. ```bash docker build -t ghcr.io/nordsecurity/nordvpn-linux/qa-peer: -f ci/docker/qa-peer/Dockerfile . ``` -------------------------------- ### Push Docker Image Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/BUILD.md After building a Docker image, use this command to push it to the specified registry. Ensure you have the correct permissions and the image is tagged appropriately. ```shell docker push /[:tag] ``` -------------------------------- ### Build Docker Image Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/BUILD.md This command builds a Docker image using the Dockerfiles located in 'ci/docker/'. Replace /[:tag] with your target registry, image name, and optional tag. ```shell docker build -t /[:tag] ci/docker/ ``` -------------------------------- ### Run Unit Tests Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/BUILD.md Executes only the unit tests for the project. This is useful for quickly verifying individual components. ```bash rps test unit ``` -------------------------------- ### Run QA Tests Faster Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/TESTING.md Use 'test:qaDockerFast' instead of 'test:qaDocker' to run QA tests without rebuilding everything each time. This is useful for iterative testing. ```bash mage test:qaDockerFast fileshare test ``` -------------------------------- ### Register a New NordVPN Account Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.6.0_1577970512.md Use this command to create a new NordVPN account directly from the Linux application. ```bash nordvpn register ``` -------------------------------- ### Login with Nord Account Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.12.0_1635925941.md Use this command to initiate the login process via Nord Account, which will redirect you to your browser for authentication. ```bash nordvpn login --nordaccount ``` -------------------------------- ### Create Virtual Environment Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/test/qa/README.md Creates a Python virtual environment. The directory name '.venv' is conventional and included in .gitignore. ```bash python3 -m venv ``` -------------------------------- ### Run NordVPN Container with Custom Command Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/ci/docker/nordvpn/README.md Executes a custom command within the NordVPN container after which the container continues running and logs daemon output. Killswitch can be managed. ```bash docker run -e NORDVPN_LOGIN_TOKEN=0123456789abcdef --cap-add=NET_ADMIN -it --rm --name=vpn vpn "nordvpn set killswitch off && nordvpn set meshnet on && nordvpn connect" ``` -------------------------------- ### Configure Routing Setting Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.15.0_1666000343.md Set the `routing` configuration parameter using the `nordvpn set routing` command. Consult `nordvpn set routing --help` for available options. ```bash nordvpn set routing ``` -------------------------------- ### List rps Commands Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/BUILD.md Displays all available commands provided by the 'rps' tool. Use this to discover available scripts for managing the project. ```bash rps ls ``` -------------------------------- ### System Dependencies: PkgConfig and GTK Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Finds and checks for the GTK+ 3.0 library using PkgConfig, making its imported target available for linking. ```cmake find_package(PkgConfig REQUIRED) pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) ``` -------------------------------- ### Enable CyberSec (Legacy) Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.14.0_1654083676.md This command is for enabling CyberSec, which is now referred to as Threat Protection Lite. It is maintained for backward compatibility. ```bash nordvpn set cybersec on ``` -------------------------------- ### Enable Meshnet Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.14.2_1659002211.md Use this command to enable the new Meshnet feature. This allows secure connections to remote devices. ```bash nordvpn set meshnet on ``` -------------------------------- ### Run QA-Peer Docker Container Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/ci/docker/qa-peer/README.md This command runs the QA-Peer Docker image interactively, granting it network administration capabilities and removing the container upon exit. It's designed for testing scenarios. ```bash docker run --cap-add=NET_ADMIN -it --rm --name=qa-peer ghcr.io/nordsecurity/nordvpn-linux/qa-peer ``` -------------------------------- ### Enable Post-Quantum Encryption Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.19.0_1726656718.md Enable post-quantum encryption to protect your data against future cyber threats. This command activates enhanced security measures. ```bash nordvpn set pq on ``` -------------------------------- ### Find System Dependencies Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/flutter/CMakeLists.txt Uses PkgConfig to find and check for required system-level dependencies: GTK, GLIB, and GIO. These are essential for Flutter's Linux integration. ```cmake find_package(PkgConfig REQUIRED) pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) ``` -------------------------------- ### Build Development NordVPN Docker Image Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/ci/docker/nordvpn/README.md Builds a development version of the NordVPN Docker image. Requires a .deb package built in dist/app/deb and the project root as the build context. ```dockerfile docker build -f ci/docker/nordvpn/Dockerfile.dev -t nordvpn . ``` -------------------------------- ### Enable Threat Protection Lite Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.14.0_1654083676.md Use this command to enable the Threat Protection Lite feature. The old command is also supported for convenience. ```bash nordvpn set threatprotectionlite on ``` -------------------------------- ### Restore Default Settings with Kill Switch Option Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/4.1.0.md Use this command to restore default settings while keeping the Kill Switch enabled. This option allows for a partial reset, preserving network security features. ```bash nordvpn set defaults --off killswitch ``` -------------------------------- ### Run Integration Tests Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/BUILD.md Executes only the integration tests for the project. Refer to the integration test README for more details on the testing approach. ```bash rps test int ``` -------------------------------- ### Connect to a Specific Group Server Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.4.0_1571652129.md When connecting to group servers, you can specify the desired location, such as 'p2p' in Canada. ```bash nordvpn connect --group p2p Canada ``` -------------------------------- ### Regenerate Golden Files for Firewall Tests Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/TESTING.md Run the full cgo test suite with the UPDATE_GOLDEN_FILES=1 environment variable to regenerate golden files for nftables firewall ruleset tests. These tests require root privileges. ```bash UPDATE_GOLDEN_FILES=1 mage test:cgoDocker ``` -------------------------------- ### Traditional Login Command Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.12.0_1635925941.md The existing `nordvpn login` command is still available for users who prefer the traditional login method. ```bash nordvpn login ``` -------------------------------- ### Run NordVPN Docker Container Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/ci/docker/nordvpn/README.md Runs the NordVPN Docker container with necessary capabilities and a login token. The container opens a bash session for configuration. ```bash docker run -e NORDVPN_LOGIN_TOKEN=0123456789abcdef --cap-add=NET_ADMIN -it --rm --name=nordvpn nordvpn ``` -------------------------------- ### Run Riverpod Code Generation Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/CONTRIBUTE.md Execute this command to generate necessary files when modifying Riverpod annotated classes. Alternatively, use 'watch' to automatically regenerate files upon changes. ```bash dart run build_runner build ``` ```bash dart run build_runner watch ``` -------------------------------- ### Switch back to OpenVPN Technology Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.3.0_1564480800.md If needed, use this command to revert your NordVPN Linux client back to the OpenVPN protocol. ```bash nordvpn set technology OpenVPN ``` -------------------------------- ### Export Variables on Separate Lines Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/ci/README.md Demonstrates the correct way to set and export variables on separate lines to ensure proper exit codes and execution flow, especially when 'set -e' is used. ```bash export ONE_LINE=$(false) # exit code 0, because the second one is discarded TWO_LINE=$(false) # exit code 1 export $TWO_LINE # exit code 0, but this would not be executed if `set -e` was provided ``` -------------------------------- ### Enable IPv6 Support Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.10.0_1622032586.md Use this command to enable IPv6 support in NordVPN on Linux. Ensure your system and network support IPv6. ```bash nordvpn set ipv6 on ``` -------------------------------- ### Define Application Target and Link Libraries Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Defines the main executable target and links it against necessary libraries including Flutter, GTK, and X11. ```cmake add_executable(${BINARY_NAME} "main.cc" "nordvpn.cc" "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" ) # Apply the standard set of build settings. This can be removed for applications # that need different build settings. apply_standard_settings(${BINARY_NAME}) # Add dependency libraries. Add any application-specific dependencies here. target_link_libraries(${BINARY_NAME} PRIVATE flutter) target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) target_link_libraries(${BINARY_NAME} PRIVATE X11::X11) ``` -------------------------------- ### Activate Virtual Environment Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/test/qa/README.md Activates the created virtual environment. This command modifies the shell prompt to indicate the active environment. ```bash source .venv/bin/activate ``` -------------------------------- ### Restore Default Settings Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.7.0_1584023922.md Use this command to reset NordVPN to its default configuration. ```bash nordvpn set defaults ``` -------------------------------- ### Login with Authentication Token Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.15.0_1666000343.md Log in to NordVPN using a token generated from your Nord Account. Refer to the `--token` option for detailed usage. ```bash nordvpn login --token ``` -------------------------------- ### View Current VPN Technology Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.4.0_1571652129.md Check which VPN technology (OpenVPN or NordLynx) is currently active with this command. ```bash nordvpn settings ``` -------------------------------- ### Enable Tray Icon Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.18.2_1717154645.md Use this command to re-enable the tray icon if it has been disabled. ```bash nordvpn set tray on ``` -------------------------------- ### Set Notification Preferences Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.14.2_1659002211.md This command is used to manage notification preferences. The app now correctly follows these settings. ```bash nordvpn set notify ``` -------------------------------- ### Runtime Output Directory for Executable Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Sets the runtime output directory for the executable to a subdirectory to ensure correct resource loading and prevent running unbundled copies. ```cmake set_target_properties(${BINARY_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" ) ``` -------------------------------- ### Run All Tests Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/BUILD.md Executes all unit and integration tests within the project using the 'rps' test runner. This provides a comprehensive check of the application's functionality. ```bash rps test all ``` -------------------------------- ### Generate Translations with slang Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/BUILD.md Alternative command to regenerate translation files using the 'slang' package directly. Use this after modifying the i18n JSON files. ```bash dart run slang ``` -------------------------------- ### Whitelist Subnet for Local Network Access Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.7.0_1584023922.md Add a subnet to the whitelist to enable access to local network resources while connected to the VPN. Specify the subnet address in CIDR notation. ```bash nordvpn whitelist add subnet ``` -------------------------------- ### Run Multiple QA Test Categories Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/TESTING.md Execute QA tests across multiple categories in a single Docker container command using mage. Enclose multiple category names in quotes, separated by spaces. ```bash mage test:qaDocker "fileshare meshnet" test ``` -------------------------------- ### Include Generated Plugin CMake Rules Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Includes the CMake file that manages the build rules for generated plugins. ```cmake include(flutter/generated_plugins.cmake) ``` -------------------------------- ### Restore Default Settings with Logout Option Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/4.1.0.md Use this command to restore default settings and log out of your NordVPN account. This command allows for a full reset including session termination. ```bash nordvpn set defaults --logout ``` -------------------------------- ### Remove All Whitelist Entries Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.9.0_1616072874.md Use this command to clear all previously added items from the NordVPN whitelist. ```bash nordvpn whitelist remove all ``` -------------------------------- ### Run a Single QA Test Function Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/TESTING.md Execute a specific QA test function within a Docker container using mage. Provide the category name and the exact test function name. ```bash mage test:qaDocker fileshare test_accept ``` -------------------------------- ### Run QA Tests by Category and Function Pattern Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/TESTING.md Execute QA tests within a Docker container using mage. Specify the test category name and a pattern for test functions. Use 'test' to run all tests in a category. ```bash mage test:qaDocker fileshare test ``` -------------------------------- ### Update Requirements File Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/test/qa/README.md Freezes the current Python environment's packages and outputs them to a requirements file. This action implies that a new QA Docker image may need to be built and pushed. ```bash python3 -m pip freeze > ``` -------------------------------- ### Build Code Generation Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/BUILD.md Manually triggers the regeneration of code for Riverpod annotations. Use this when automatic watching is not active or to ensure files are up-to-date. ```bash dart run build_runner build ``` -------------------------------- ### Custom Command for Flutter Tool Backend Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/flutter/CMakeLists.txt Defines a custom command to execute the Flutter tool backend script. This command generates the Flutter library and header files. A phony target is used to ensure it runs on every build. ```cmake add_custom_command( OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/_phony_ COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} VERBATIM ) ``` -------------------------------- ### Flutter Managed Directory and Subdirectory Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Sets the path to the Flutter managed directory and adds it as a subdirectory for build rules. ```cmake set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") add_subdirectory(${FLUTTER_MANAGED_DIR}) ``` -------------------------------- ### Enable Idempotent Docker Image Pulls Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/BUILD.md To ensure Docker images are only pulled from the registry if they are not already present on the host system, add this entry to your .env file. ```shell IDEMPOTENT_DOCKER=1 ``` -------------------------------- ### Standard Compilation Settings Function Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/CMakeLists.txt Applies common compilation features, warnings, optimization levels, and definitions to a target. Use with caution as it affects all targets it's applied to. ```cmake function(APPLY_STANDARD_SETTINGS TARGET) target_compile_features(${TARGET} PUBLIC cxx_std_14) target_compile_options(${TARGET} PRIVATE -Wall -Werror) target_compile_options(${TARGET} PRIVATE "<$>:-O3>") target_compile_definitions(${TARGET} PRIVATE "<$>:NDEBUG>") endfunction() ``` -------------------------------- ### Route Other Container Through VPN Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/ci/docker/nordvpn/README.md Connects another container (e.g., Ubuntu) to the NordVPN container's network namespace to route its traffic through the VPN. ```bash docker run --net=container:nordvpn -it --rm ubuntu ``` -------------------------------- ### Configure Docker for Meshnet Routing on Fedora Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/README.md Fixes an issue where Docker on Fedora drops forwarded traffic, preventing Meshnet routing. This configuration ensures that forwarded traffic is not dropped. ```json { "ip-forward-no-drop": true } ``` -------------------------------- ### Add Flutter Library Interface Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/flutter/CMakeLists.txt Creates an INTERFACE library target named 'flutter'. It specifies include directories and links against the Flutter library and system dependencies (GTK, GLIB, GIO). ```cmake add_library(flutter INTERFACE) target_include_directories(flutter INTERFACE "${EPHEMERAL_DIR}" ) target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") target_link_libraries(flutter INTERFACE PkgConfig::GTK PkgConfig::GLIB PkgConfig::GIO ) add_dependencies(flutter flutter_assemble) ``` -------------------------------- ### Set Firewall State Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/contrib/changelog/prod/3.9.0_1616072874.md This command allows you to enable or disable the NordVPN application's firewall management. ```bash nordvpn set firewall on ``` ```bash nordvpn set firewall off ``` -------------------------------- ### Custom List Prepend Function Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/linux/flutter/CMakeLists.txt Defines a custom function 'list_prepend' to prepend a prefix to each element of a list. This is a workaround for older CMake versions (pre-3.10) that lack the 'list(TRANSFORM ... PREPEND ...)' command. ```cmake function(list_prepend LIST_NAME PREFIX) set(NEW_LIST "") foreach(element ${${LIST_NAME}}) list(APPEND NEW_LIST "${PREFIX}${element}") endforeach(element) set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) endfunction() ``` -------------------------------- ### Apply Dart Fixes Source: https://github.com/nordsecurity/nordvpn-linux/blob/main/gui/BUILD.md Analyzes the project for code issues and automatically applies fixes. This command helps maintain code quality and consistency. ```bash dart fix ```