### Install using .run Installer Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/installation.md Install the application using the downloaded .run installer with sudo privileges. ```bash sudo ./snx-rs-*-linux-x86_64.run ``` -------------------------------- ### Make Installer Executable Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/installation.md Make the downloaded .run installer executable before running it. ```bash chmod +x snx-rs-*-linux-x86_64.run ``` -------------------------------- ### Install Cross-rs Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/building.md Install the 'cross-rs' tool, which is required for cross-compilation, especially for static builds. ```bash cargo install cross ``` -------------------------------- ### Connect to VPN in Command Mode Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/command-line-usage.md Example of establishing a VPN connection using command mode. Parameters are typically read from the default configuration file. ```sh snxctl connect ``` -------------------------------- ### Build Release Version Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/building.md Use this command to build the optimized release version of the application. Ensure Rust and its dependencies are installed. ```bash cargo build --release ``` -------------------------------- ### Connect to VPN in Standalone Mode Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/command-line-usage.md Example of establishing a VPN connection in standalone mode. Connection parameters can be provided via the command line or a configuration file. ```sh snx-rs -m standalone --login-type vpn_Username_Password --username user --password pass -s vpn.example.com ``` -------------------------------- ### Build Debug Version Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/building.md Use this command to build the debug version of the application. Ensure Rust and its dependencies are installed. ```bash cargo build ``` -------------------------------- ### Get Supported Login Types (CLI) Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/quick-start.md Use this command to retrieve a list of supported login types from the specified server. This is a prerequisite for establishing a connection. ```bash snx-rs -m info -s remote.company.com ``` -------------------------------- ### Install and Configure snx-rs on NixOS Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/nixos.md Add snx-rs to your system packages and configure its systemd service. Ensure the firewall allows keepalive traffic. ```nix { config, pkgs, ... }: let unstable = import {}; in { environment.systemPackages = with pkgs; [ unstable.snx-rs ]; systemd.services.snx-rs = { enable = true; description = "SNX-RS VPN client for Linux"; after = [ "network-online.target" ]; wants = [ "network-online.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { ExecStart = "${unstable.pkgs.snx-rs}/bin/snx-rs -m command -l debug"; Type = "simple"; }; }; # update the firewall rule to allow keepalive traffic networking.firewall.checkReversePath = "loose"; ``` -------------------------------- ### Get Server Info in Standalone Mode Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/command-line-usage.md Use this command to retrieve information about the VPN server, including supported authentication methods and tunnel types. This is useful for determining the correct login type to use. ```sh # in standalone mode snx-rs -m info -s remote.acme.com ``` -------------------------------- ### Get Server Info in Command Mode Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/command-line-usage.md Use this command to retrieve information about the VPN server when snx-rs is running in command mode. This is useful for determining the correct login type to use. ```sh # in command mode snxctl info ``` -------------------------------- ### Display Help for Standalone Mode Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/command-line-usage.md Run this command to display all available command-line parameters and usage instructions for the standalone mode. ```sh snx-rs --help ``` -------------------------------- ### Display Help for Command Mode Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/command-line-usage.md Run this command to display usage help for the command mode, listing accepted commands. ```sh snxctl --help ``` -------------------------------- ### Run GUI Frontend Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/quick-start.md To run the GUI, access it from your desktop environment's application menu. If dbus SNI is unavailable, use the `--no-tray` parameter to display the status window. ```bash snx-rs-gui --no-tray ``` -------------------------------- ### Enroll Certificate with snx-rs Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/certificates.md Use this command to enroll a new certificate for authentication. Requires a registration key, certificate path, password, and server name. ```bash snx-rs --mode enroll \ --reg-key 12345678 \ --cert-path identity.p12 \ --cert-password password \ --server-name remote.company.com ``` -------------------------------- ### Build with Mobile Access Feature Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/building.md Build the application with the 'mobile-access' feature enabled. Note that this feature is not available on macOS. ```bash cargo build --features=mobile-access ``` -------------------------------- ### Enable systemd-resolved on Linux Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/dns-configuration.md Steps to enable and configure systemd-resolved for DNS resolution on Linux systems. ```bash sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf ``` ```bash sudo systemctl enable --now systemd-resolved ``` ```bash sudo systemctl restart NetworkManager ``` -------------------------------- ### Build Release Binaries for macOS Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/installation.md Build the release binaries for snx-rs and snxctl on macOS using Cargo. ```bash cargo build --release -p snx-rs -p snxctl ``` -------------------------------- ### Static Musl Build Source: https://github.com/ancwrd1/snx-rs/blob/main/AGENTS.md Performs a static build targeting x86_64-unknown-linux-musl, suitable for release pipelines. Requires cross-rs and Docker/Podman. Includes vendored OpenSSL and SQLite, and enables Link Time Optimization (LTO). ```bash cross build --target=x86_64-unknown-linux-musl \ --features snxcore/vendored-openssl,snxcore/vendored-sqlite \ -p snx-rs --profile lto ``` -------------------------------- ### Release Build with Mobile Access Feature Source: https://github.com/ancwrd1/snx-rs/blob/main/AGENTS.md Enables the 'mobile-access' feature for release builds, which includes embedded WebKit for the Mobile Access portal flow. ```bash cargo build --release --features mobile-access ``` -------------------------------- ### Run Tunnel (CLI Standalone) Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/quick-start.md Establishes a VPN tunnel using the specified login type and server. Requires root privileges. ```bash sudo snx-rs -o vpn_Microsoft_Authenticator -s remote.company.com ``` -------------------------------- ### Build Static Executable Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/building.md Build a statically linked snx-rs executable using cross-compilation. This command includes features for vendored OpenSSL and SQLite, and uses the 'lto' profile for potential optimizations. ```bash cross build --target=x86_64-unknown-linux-musl --features snxcore/vendored-openssl,snxcore/vendored-sqlite -p snx-rs --profile lto ``` -------------------------------- ### Run snx-rs in Standalone Mode Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/usage-examples.md Use this command for standalone VPN connections with trace logging and an IPsec tunnel. Ensure you specify the VPN profile and server. ```bash sudo ./snx-rs -o vpn_Microsoft_Authenticator -s remote.company.com -e ipsec -l trace ``` -------------------------------- ### Run snx-rs in Command Mode Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/usage-examples.md This command enables command mode with debug logging. Use 'snxctl' to establish the connection separately after running this command. ```bash sudo ./snx-rs -m command -l debug ``` -------------------------------- ### Connect with Certificate Error Override (CLI) Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/quick-start.md Connects to the VPN while bypassing certificate validation. Use with caution as this is insecure and not recommended. ```bash sudo snx-rs -X true -o vpn_Microsoft_Authenticator -s remote.company.com ``` -------------------------------- ### Check systemd-resolved symlink Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/dns-configuration.md Verify if systemd-resolved is configured by checking the symlink of /etc/resolv.conf. ```bash readlink /etc/resolv.conf ``` -------------------------------- ### CI Gate Checks Source: https://github.com/ancwrd1/snx-rs/blob/main/AGENTS.md Essential commands to run as part of the CI process to ensure code quality and correctness. These include checking code formatting, running clippy with strict warnings, and executing all workspace tests with the 'mobile-access' feature enabled. ```bash cargo fmt --check ``` ```bash cargo clippy --workspace --features mobile-access -- -D warnings ``` ```bash cargo test --workspace --features mobile-access ``` -------------------------------- ### Client Logging Data Structure Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/options.md This JSON structure defines custom client logging data. All fields are optional and can be used to impersonate the official client. ```json { "device_id": "{A0FCE543-DB44-4EEF-803D-4F017361442A}", "client_name": "Endpoint Security VPN", "client_ver": "E88.30", "client_build_number": "986105506", "os_name": "Windows", "os_version": "11", "os_edition": "Professional", "os_build": "26200", "os_bits": "64bit", "device_type": "PC", "machine_domain": "mydomain.corp.local", "machine_name": "DESKTOP-XXXX", "mac_address": "01:02:03:04:05:06", "physical_ip": "192.168.1.100" } ``` -------------------------------- ### Renew Certificate with snx-rs Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/certificates.md Use this command to renew an existing certificate. Requires the path to the current PKCS12 keystore, its password, and the server name. ```bash snx-rs --mode renew \ --cert-path identity.p12 \ --cert-password password \ --server-name remote.company.com ``` -------------------------------- ### Ignore Certificate Errors Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/command-line-usage.md If a certificate error is encountered during connection, add the `-X true` parameter to ignore certificate validation. Use with caution. ```sh snx-rs -m standalone -X true -o vpn_Username_Password -u user -p pass -s vpn.example.com ``` -------------------------------- ### Add musl Target Source: https://github.com/ancwrd1/snx-rs/blob/main/docs/building.md Add the 'x86_64-unknown-linux-musl' target to your Rust compiler. This is necessary for building static Linux executables. ```bash rustup target add x86_64-unknown-linux-musl ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.