### Install via Pip Source: https://context7.com/eduvpn/linux-app/llms.txt Install the client using pip, especially for unsupported distributions or ARM64. System dependencies must be installed first. ```bash # Install system dependencies first (Debian/Ubuntu): $ sudo apt install gir1.2-nm-1.0 gir1.2-secret-1 gir1.2-gtk-3.0 gir1.2-notify-0.7 \ libcairo2-dev libgirepository1.0-dev python3-dev python3-gi \ network-manager-openvpn-gnome # Then install the client with GUI extras: $ pip install "eduvpn-client[gui]" # Reboot after installation ``` -------------------------------- ### Manual Installation for Ubuntu 26.04 Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Manually install the eduVPN client on Ubuntu 26.04 (Resolute) by adding the repository and installing the package. ```bash $ sudo apt update $ sudo apt install apt-transport-https wget $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ resolute main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list $ sudo apt update $ sudo apt install eduvpn-client ``` -------------------------------- ### Manual Installation for Ubuntu 25.10 Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Manually install the eduVPN client on Ubuntu 25.10 (Questing) by adding the repository and installing the package. ```bash $ sudo apt update $ sudo apt install apt-transport-https wget $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ questing main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list $ sudo apt update $ sudo apt install eduvpn-client ``` -------------------------------- ### Install EduVPN on Fedora Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Installs the EduVPN client on Fedora by adding the RPM repository and installing the package. ```bash $ curl https://app.eduvpn.org/linux/v4/rpm/app+linux@eduvpn.org.asc | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-python-eduvpn-client_v4 > /dev/null $ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4.repo [python-eduvpn-client_v4] name=eduVPN for Linux 4.x (Fedora $releasever) baseurl=https://app.eduvpn.org/linux/v4/rpm/fedora-$releasever-$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-python-eduvpn-client_v4 gpgcheck=1 enabled=1 EOF $ sudo dnf install eduvpn-client ``` -------------------------------- ### Installation on Fedora (42/43/44) Source: https://context7.com/eduvpn/linux-app/llms.txt Configure the RPM repository and install the eduVPN client on Fedora systems. ```bash $ curl https://app.eduvpn.org/linux/v4/rpm/app+linux@eduvpn.org.asc \ | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-python-eduvpn-client_v4 > /dev/null $ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4.repo [python-eduvpn-client_v4] name=eduVPN for Linux 4.x (Fedora $releasever) baseurl=https://app.eduvpn.org/linux/v4/rpm/fedora-$releasever-$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-python-eduvpn-client_v4 gpgcheck=1 enabled=1 EOF $ sudo dnf install eduvpn-client ``` -------------------------------- ### Manual Installation for Ubuntu 22.04 Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Manually install the eduVPN client on Ubuntu 22.04 (Jammy) by adding the repository and installing the package. ```bash $ sudo apt update $ sudo apt install apt-transport-https wget $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ jammy main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list $ sudo apt update $ sudo apt install eduvpn-client ``` -------------------------------- ### Purge Old Client and Install via Pip (Debian/Ubuntu) Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/updating.md For other Debian-based distributions, first purge the old client using apt, then remove unused dependencies. Installation should then proceed via Pip as per the installation guide. ```bash $ sudo apt purge eduvpn-client $ sudo apt autoremove ``` -------------------------------- ### Download and Run Install Script Source: https://context7.com/eduvpn/linux-app/llms.txt Use this script for the recommended installation on supported Debian/Ubuntu/Fedora distributions. ```bash # Download and run the official install script $ curl --proto '=https' --tlsv1.2 https://docs.eduvpn.org/client/linux/install.sh -O $ bash ./install.sh ``` -------------------------------- ### Manual Installation for Ubuntu 24.04 Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Manually install the eduVPN client on Ubuntu 24.04 (Noble) by adding the repository and installing the package. ```bash $ sudo apt update $ sudo apt install apt-transport-https wget $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ noble main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list $ sudo apt update $ sudo apt install eduvpn-client ``` -------------------------------- ### Install EduVPN on NixOS (nix-env) Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Installs the EduVPN client on NixOS using the nix-env command. ```bash nix-env -iA nixpkgs.eduvpn-client ``` -------------------------------- ### Manual Installation for Debian 12 Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Manually install the eduVPN client on Debian 12 (Bookworm) by adding the repository and installing the package. ```bash $ sudo apt update $ sudo apt install apt-transport-https wget $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ bookworm main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list $ sudo apt update $ sudo apt install eduvpn-client ``` -------------------------------- ### Server Class Example Source: https://context7.com/eduvpn/linux-app/llms.txt Illustrates creating a generic `Server` instance for custom VPN configurations. Requires `Server` import. ```python from eduvpn.server import InstituteServer, SecureInternetServer, Server # Custom server (Let's Connect!): custom = Server("https://myvpn.example.com/", {"en": "My VPN"}) print(custom.category_id) # ServerType.CUSTOM ``` -------------------------------- ### Manual Installation for Debian 13 Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Manually install the eduVPN client on Debian 13 (Trixie) by adding the repository and installing the package. ```bash $ sudo apt update $ sudo apt install apt-transport-https wget $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ trixie main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list $ sudo apt update $ sudo apt install eduvpn-client ``` -------------------------------- ### Install EduVPN on openSUSE Leap 15.6 Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Installs the EduVPN client on openSUSE Leap 15.6 by adding a development repository and installing the package. ```bash $ sudo zypper addrepo https://download.opensuse.org/repositories/network:vpn/openSUSE_Leap_15.6/network:vpn.repo $ sudo zypper refresh $ sudo zypper install eduvpn-client ``` -------------------------------- ### Manual Installation for Ubuntu 25.04 Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Manually install the eduVPN client on Ubuntu 25.04 (Plucky) by adding the repository and installing the package. ```bash $ sudo apt update $ sudo apt install apt-transport-https wget $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ plucky main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list $ sudo apt update $ sudo apt install eduvpn-client ``` -------------------------------- ### Install eduVPN Client via Pip Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Installs the eduVPN client package, including GUI support, using pip. Consider using Pipx if pip installation fails due to environment management issues. ```bash pip install "eduvpn-client[gui]" ``` -------------------------------- ### Install EduVPN on openSUSE Tumbleweed Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Installs the EduVPN client on openSUSE Tumbleweed using zypper. ```bash $ sudo zypper install eduvpn-client ``` -------------------------------- ### Manual Installation on Debian 12 Source: https://context7.com/eduvpn/linux-app/llms.txt Manually add the eduVPN repository and install the client on Debian 12. ```bash $ sudo apt update $ sudo apt install apt-transport-https wget $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc \ | gpg --dearmor \ | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] \ https://app.eduvpn.org/linux/v4/deb/ bookworm main" \ | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list $ sudo apt update $ sudo apt install eduvpn-client ``` -------------------------------- ### Install EduVPN on NixOS (nix run) Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Installs the EduVPN client on NixOS using the new Nix command with flakes enabled. ```bash nix run nixpkgs#eduvpn-client ``` -------------------------------- ### Install EduVPN using Pip Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Provides instructions for installing the EduVPN client using pip, suitable for unsupported distributions. ```bash # pip install eduvpn-client ``` -------------------------------- ### InstituteServer Class Example Source: https://context7.com/eduvpn/linux-app/llms.txt Demonstrates creating an `InstituteServer` instance for university VPN access. Requires `InstituteServer` import. ```python from eduvpn.server import InstituteServer, SecureInternetServer, Server # Institute Access server (university VPN): inst = InstituteServer( url="https://vpn.tudelft.nl/", display_name={"en": "Delft University of Technology", "nl": "TU Delft"}, support_contact=["mailto:ict@tudelft.nl"], profiles=None, ) print(inst.identifier) # "https://vpn.tudelft.nl/" print(str(inst)) # "Delft University of Technology" (uses system locale) ``` -------------------------------- ### Install eduVPN using a script Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Use this script for a simplified installation on Debian, Ubuntu, Fedora, or CentOS. Ensure Curl is installed beforehand. ```bash $ curl --proto '=https' --tlsv1.2 https://docs.eduvpn.org/client/linux/install.sh -O $ bash ./install.sh ``` -------------------------------- ### Add New Repository and Install (Fedora) Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/updating.md Download and import the new GPG key, then create the new repository configuration file. Finally, refresh the DNF package cache and update. ```bash $ curl -O https://app.eduvpn.org/linux/v4/rpm/app+linux@eduvpn.org.asc $ sudo rpm --import app+linux@eduvpn.org.asc $ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4.repo [python-eduvpn-client_v4] name=eduVPN for Linux 4.x (Fedora $releasever) baseurl=https://app.eduvpn.org/linux/v4/rpm/fedora-$releasever-$basearch gpgcheck=1 EOF $ sudo dnf --refresh update ``` -------------------------------- ### Add New Repository and Install (Debian/Ubuntu) Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/updating.md Install necessary packages, download and import the new GPG key, add the new repository configuration, update package lists, and upgrade the client. This is for Ubuntu 20.04, >= 22.04, or Debian 11/12. ```bash $ sudo apt install apt-transport-https lsb-release wget $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list $ sudo apt update $ sudo apt upgrade ``` -------------------------------- ### Install eduVPN Pre-release on AlmaLinux 9 Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/prerelease.md Adds the GPG key and repository for eduVPN pre-releases on AlmaLinux 9, installs EPEL release, and then installs the client. Ensure EPEL is enabled. ```console $ curl https://app.eduvpn.org/linux/v4-dev/rpm/app+linux+dev@eduvpn.org.asc | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-python-eduvpn-client_v4-dev > /dev/null $ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4-dev.repo [python-eduvpn-client_v4-dev] name=eduVPN for Linux 4.x Pre-releases (AlmaLinux 9) baseurl=https://app.eduvpn.org/linux/v4-dev/rpm/alma+epel-9-$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-python-eduvpn-client_v4-dev gpgcheck=1 enabled=1 EOF $ sudo dnf install epel-release $ sudo dnf install eduvpn-client ``` -------------------------------- ### Install eduVPN Pre-release on Rocky Linux 9 Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/prerelease.md Adds the GPG key and repository for eduVPN pre-releases on Rocky Linux 9, installs EPEL release, and then installs the client. Ensure EPEL is enabled. ```console $ curl https://app.eduvpn.org/linux/v4-dev/rpm/app+linux+dev@eduvpn.org.asc | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-python-eduvpn-client_v4-dev > /dev/null $ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4-dev.repo [python-eduvpn-client_v4-dev] name=eduVPN for Linux 4.x Pre-releases (Rocky Linux 9) baseurl=https://app.eduvpn.org/linux/v4-dev/rpm/rocky+epel-9-$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-python-eduvpn-client_v4-dev gpgcheck=1 enabled=1 EOF $ sudo dnf install epel-release $ sudo dnf install eduvpn-client ``` -------------------------------- ### Install EduVPN on Arch Linux (AUR) Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Installs the EduVPN client from the AUR on Arch Linux. Requires importing the GPG key first. ```bash $ curl https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --import - ``` ```bash $ pamac build python-eduvpn-client ``` ```bash $ yay -S python-eduvpn-client ``` -------------------------------- ### Install Dependencies on Fedora Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Installs required libraries and development packages for eduVPN on Fedora systems. ```bash sudo dnf install \ libnotify \ libsecret \ gtk3 \ python3-gobject \ python3-pytest \ python3-cairo-devel \ gobject-introspection-devel \ cairo-gobject-devel ``` -------------------------------- ### Install on NixOS Source: https://context7.com/eduvpn/linux-app/llms.txt Configure NixOS to include the eduVPN client and enable NetworkManager. ```nix # In configuration.nix: { config, pkgs, }: { environment.systemPackages = [ pkgs.eduvpn-client ]; networking.networkmanager.enable = true; # For OpenVPN support: networking.networkmanager.plugins = [ pkgs.networkmanager-openvpn ]; } ``` -------------------------------- ### Install eduVPN Pre-release on Fedora Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/prerelease.md Adds the GPG key and repository for eduVPN pre-releases on Fedora and installs the client. Ensure you are using a compatible Fedora version. ```console $ curl https://app.eduvpn.org/linux/v4-dev/rpm/app+linux+dev@eduvpn.org.asc | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-python-eduvpn-client_v4-dev > /dev/null $ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4-dev.repo [python-eduvpn-client_v4-dev] name=eduVPN for Linux 4.x Pre-releases (Fedora $releasever) baseurl=https://app.eduvpn.org/linux/v4-dev/rpm/fedora-$releasever-$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-python-eduvpn-client_v4-dev gpgcheck=1 enabled=1 EOF $ sudo dnf install eduvpn-client ``` -------------------------------- ### Install Dependencies on Debian/Ubuntu Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Installs necessary system libraries and development packages for eduVPN on Debian or Ubuntu systems. ```bash sudo apt update sudo apt install \ gir1.2-nm-1.0 \ gir1.2-secret-1 \ gir1.2-gtk-3.0 \ gir1.2-notify-0.7 \ libcairo2-dev \ libgirepository1.0-dev \ python3-dev \ python3-gi \ python3-setuptools \ python3-pytest \ python3-wheel \ network-manager-openvpn-gnome ``` -------------------------------- ### Install Dependencies on openSUSE Tumbleweed Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/installation.md Installs necessary libraries and development packages for eduVPN on openSUSE Tumbleweed. ```bash sudo zypper install \ libnotify \ libsecret \ gtk3 \ python3-gobject \ python3-pytest \ python3-cairo-devel \ gobject-introspection-devel \ typelib-1_0-Notify-0_7 \ typelib-1_0-Secret-1 \ typelib-1_0-Gtk-3_0 ``` -------------------------------- ### SecureInternetServer Class Example Source: https://context7.com/eduvpn/linux-app/llms.txt Shows how to instantiate a `SecureInternetServer` for secure internet roaming. Requires `SecureInternetServer` import. ```python from eduvpn.server import InstituteServer, SecureInternetServer, Server # Secure Internet server (roaming): si = SecureInternetServer( org_id="https://idp.surf.nl/", display_name={"en": "SURF"}, support_contact=[], profiles=None, country_code="NL", locations=["NL", "DE", "US"], ) print(si.country_code) # "NL" print(si.locations) # ["NL", "DE", "US"] ``` -------------------------------- ### Install eduVPN Pre-release on CentOS Stream 9 Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/prerelease.md Adds the GPG key and repository for eduVPN pre-releases on CentOS Stream 9 and installs the client. This command assumes EPEL Next is available. ```console $ curl https://app.eduvpn.org/linux/v4-dev/rpm/app+linux+dev@eduvpn.org.asc | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-python-eduvpn-client_v4-dev > /dev/null $ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4-dev.repo [python-eduvpn-client_v4-dev] name=eduVPN for Linux 4.x Pre-releases (CentOS Stream 9) baseurl=https://app.eduvpn.org/linux/v4-dev/rpm/centos-stream+epel-next-9-$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-python-eduvpn-client_v4-dev gpgcheck=1 enabled=1 EOF $ sudo dnf install eduvpn-client ``` -------------------------------- ### Run eduVPN GUI Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/usage.md Launch the graphical user interface of eduVPN. This command is typically used after installing via a package manager or by hand. ```bash $ eduvpn-gui ``` -------------------------------- ### Run eduVPN Interactive CLI Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/usage.md Start the interactive mode of the eduVPN command-line interface. This mode is designed for a more user-friendly experience. ```bash $ eduvpn-cli interactive ``` -------------------------------- ### Remove Old EduVPN Configs (Debian/Ubuntu) Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/updating.md Before installing the new client, remove old configuration files, repository lists, and signing keys. It's acceptable to encounter errors if some entries do not exist. ```bash $ rm -r ~/.config/eduvpn $ sudo rm /etc/apt/sources.list.d/eduvpn.list $ sudo rm /etc/apt/trusted.gpg.d/eduvpn-client.gpg $ sudo rm /usr/share/keyrings/eduvpn.gpg $ sudo apt-key del 9BF9BF69E5DDE77F5ABE20DC966A924CE91888D2 ``` -------------------------------- ### Remove Old EduVPN Configs (Fedora) Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/updating.md Before installing the new client on Fedora, remove old configuration files and the old Copr repository. ```bash $ rm -r ~/.config/eduvpn $ sudo dnf copr remove @eduvpn/eduvpn-client ``` -------------------------------- ### Instantiate OpenVPN or WireGuard connection Source: https://context7.com/eduvpn/linux-app/llms.txt Instantiates a VPN connection object, dispatching to OpenVPNConnection or WireGuardConnection based on the provided Config object's protocol. The WireGuard example requires a valid configuration string. ```python from eduvpn.connection import Connection, Config, Protocol # WireGuard example wg_config_str = """ [Interface] PrivateKey = cHVibGljS2V5QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVo= Address = 10.10.0.2/24 DNS = 10.10.0.1 [Peer] PublicKey = c2VydmVyUHVibGljS2V5QUJDREVGR0hJSktMTU5PUFFSU1Q= Endpoint = vpn.example.edu:51820 AllowedIPs = 0.0.0.0/0 """ config = Config(wg_config_str, Protocol.WIREGUARD, True, [], False) connection = Connection.parse(config) # Returns a WireGuardConnection with a parsed ConfigParser object print(connection.config.sections()) # ['Interface', 'Peer'] ``` -------------------------------- ### Uninstall eduvpn-client[gui] with pip Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/support.md If the GUI does not launch due to attribute errors, try uninstalling the eduvpn-client[gui] package using pip. This can resolve conflicts if multiple versions of the client are installed. ```bash pip uninstall eduvpn-client[gui] ``` -------------------------------- ### Launch Graphical Clients Source: https://context7.com/eduvpn/linux-app/llms.txt Launch the eduVPN GUI client using `eduvpn-gui` or the Let's Connect! variant using `letsconnect-gui`. ```bash # Launch eduVPN GUI (installed via package: desktop entry available in app menu): $ eduvpn-gui ``` ```bash # Launch Let's Connect! variant (for self-hosted servers): $ letsconnect-gui ``` -------------------------------- ### List Configured and Available Servers with eduvpn-cli Source: https://context7.com/eduvpn/linux-app/llms.txt Use `eduvpn-cli list` to see configured servers and `eduvpn-cli list --all` to discover all available servers from the discovery service. ```bash $ eduvpn-cli list # ============================ # Institute Access Servers # ============================ # [1]: Delft University of Technology # ============================ # Secure Internet Server # ============================ # [2]: SURF # The number for the server is in [brackets] ``` ```bash $ eduvpn-cli list --all ``` -------------------------------- ### eduvpn-cli list Source: https://context7.com/eduvpn/linux-app/llms.txt Lists configured servers and optionally all available servers from discovery. ```APIDOC ## eduvpn-cli list — List configured and available servers ### Description Lists configured servers and optionally all available servers from discovery. ### Usage ```bash # List already-configured servers: $ eduvpn-cli list # List ALL servers from discovery: $ eduvpn-cli list --all ``` ### Output Example ``` # ============================ # Institute Access Servers # ============================ # [1]: Delft University of Technology # ============================ # Secure Internet Server # ============================ # [2]: SURF # The number for the server is in [brackets] ``` ``` -------------------------------- ### eduVPN and Let's Connect! Variants Source: https://context7.com/eduvpn/linux-app/llms.txt Demonstrates using predefined `ApplicationVariant` constants for eduVPN and Let's Connect!, and how to create a custom variant. Requires `EDUVPN`, `LETS_CONNECT`, and `ApplicationVariant` imports. ```python from eduvpn.variants import EDUVPN, LETS_CONNECT # eduVPN variant — uses predefined server discovery print(EDUVPN.name) # "eduVPN" print(EDUVPN.use_predefined_servers) # True print(EDUVPN.client_id) # "org.eduvpn.app.linux" # Let's Connect! variant — self-hosted, no discovery print(LETS_CONNECT.name) # "Let's Connect!" print(LETS_CONNECT.use_predefined_servers) # False # Create a custom variant: from eduvpn.variants import ApplicationVariant from pathlib import Path MY_VARIANT = ApplicationVariant( app_id="com.example.myvpn", client_id="com.example.myvpn.linux", config_prefix=Path.home() / ".config" / "myvpn", name="My VPN", icon="/usr/share/icons/myvpn.png", translation_domain="myvpn", use_predefined_servers=False, ) ``` -------------------------------- ### eduVPN CLI Help Source: https://github.com/eduvpn/linux-app/blob/master/doc/md/usage.md Display available subcommands for the eduVPN command-line interface. Use this to understand the CLI's capabilities. ```bash $ eduvpn-cli --help ``` -------------------------------- ### Launch GUI clients Source: https://context7.com/eduvpn/linux-app/llms.txt Commands to launch the graphical user interface clients for EduVPN. ```APIDOC ## GUI — `eduvpn-gui` / `letsconnect-gui` ### Description Launches the graphical client applications for EduVPN. ### Usage ```bash # Launch eduVPN GUI (installed via package, desktop entry available in app menu): $ eduvpn-gui # Launch Let's Connect! variant (for self-hosted servers): $ letsconnect-gui ``` ``` -------------------------------- ### Python API: Application Initialization Source: https://context7.com/eduvpn/linux-app/llms.txt Initializes the EduVPN Application object, setting up necessary components for GUI and CLI. ```APIDOC ## Python API — `eduvpn.app` ### `Application` — Top-level application object Initializes the NetworkManager manager, configuration, and the `ApplicationModel`. Used internally by both the GUI and CLI. ```python import eduvpn_common.main as common from eduvpn.app import Application from eduvpn.variants import EDUVPN from eduvpn.settings import CLIENT_ID, CONFIG_PREFIX # Create the eduvpn-common wrapper _common = common.EduVPN(CLIENT_ID, "4.7.2", str(CONFIG_PREFIX)) # Build the Application (initializes NMManager, Configuration, ApplicationModel) app = Application(EDUVPN, _common) # Register with eduvpn-common and set up token handlers app.model.register() # Check current NetworkManager state app.initialize_network() # Deregister when done _common.deregister() ``` ``` -------------------------------- ### parse_expiry() — Parse session expiry times Source: https://context7.com/eduvpn/linux-app/llms.txt Parses session expiry times from a JSON string into a structured object, providing details about the session's start, end, and remaining validity. ```APIDOC ## parse_expiry() ### Description Parses session expiry times from a JSON string into a structured object, providing details about the session's start, end, and remaining validity. ### Method ```python parse_expiry(expiry_json: str) ``` ### Parameters #### Request Body - **expiry_json** (str) - Required - A JSON string containing session expiry information. ### Request Example ```json { "start_time": 1700000000, "end_time": 1700043200, "button_time": 1700039600, "countdown_time": 1700040000, "notification_times": [1700036000, 1700040000], } ``` ### Response #### Success Response (200) - **Validity** (object) - An object containing session validity details like `remaining`, `is_expired`, and `end`. ### Response Example ```python # Assuming expiry_json is a valid JSON string with expiry times validity = parse_expiry(expiry_json) print(validity.remaining) # Example: timedelta(seconds=39600) print(validity.is_expired) # Example: False print(validity.end) # Example: datetime(...) ``` ``` -------------------------------- ### Initialize EduVPN Application in Python Source: https://context7.com/eduvpn/linux-app/llms.txt Initialize the `Application` object, which sets up NetworkManager, configuration, and the `ApplicationModel`. This is a prerequisite for using the Python API. ```python import eduvpn_common.main as common from eduvpn.app import Application from eduvpn.variants import EDUVPN from eduvpn.settings import CLIENT_ID, CONFIG_PREFIX # Create the eduvpn-common wrapper _common = common.EduVPN(CLIENT_ID, "4.7.2", str(CONFIG_PREFIX)) # Build the Application (initializes NMManager, Configuration, ApplicationModel) app = Application(EDUVPN, _common) # Register with eduvpn-common and set up token handlers app.model.register() # Check current NetworkManager state app.initialize_network() # Deregister when done _common.deregister() ``` -------------------------------- ### Server Type Classes Source: https://context7.com/eduvpn/linux-app/llms.txt Demonstrates the instantiation and basic usage of different server type classes: InstituteServer, SecureInternetServer, and the base Server class. ```APIDOC ## Server Type Classes ### `InstituteServer`, `SecureInternetServer`, `Server` — Server type classes ```python from eduvpn.server import InstituteServer, SecureInternetServer, Server # Institute Access server (university VPN): inst = InstituteServer( url="https://vpn.tudelft.nl/", display_name={"en": "Delft University of Technology", "nl": "TU Delft"}, support_contact=["mailto:ict@tudelft.nl"], profiles=None, ) print(inst.identifier) # "https://vpn.tudelft.nl/" print(str(inst)) # "Delft University of Technology" (uses system locale) # Secure Internet server (roaming): si = SecureInternetServer( org_id="https://idp.surf.nl/", display_name={"en": "SURF"}, support_contact=[], profiles=None, country_code="NL", locations=["NL", "DE", "US"], ) print(si.country_code) # "NL" print(si.locations) # ["NL", "DE", "US"] # Custom server (Let's Connect!): custom = Server("https://myvpn.example.com/", {"en": "My VPN"}) print(custom.category_id) # ServerType.CUSTOM ``` ``` -------------------------------- ### ApplicationVariant Classes Source: https://context7.com/eduvpn/linux-app/llms.txt Shows how to use predefined application variants like EDUVPN and LETS_CONNECT, and how to define a custom ApplicationVariant. ```APIDOC ## Python API — `eduvpn.variants` ### `ApplicationVariant` — Define a client variant (eduVPN or Let's Connect!) ```python from eduvpn.variants import EDUVPN, LETS_CONNECT # eduVPN variant — uses predefined server discovery print(EDUVPN.name) # "eduVPN" print(EDUVPN.use_predefined_servers) # True print(EDUVPN.client_id) # "org.eduvpn.app.linux" # Let's Connect! variant — self-hosted, no discovery print(LETS_CONNECT.name) # "Let's Connect!" print(LETS_CONNECT.use_predefined_servers) # False # Create a custom variant: from eduvpn.variants import ApplicationVariant from pathlib import Path MY_VARIANT = ApplicationVariant( app_id="com.example.myvpn", client_id="com.example.myvpn.linux", config_prefix=Path.home() / ".config" / "myvpn", name="My VPN", icon="/usr/share/icons/myvpn.png", translation_domain="myvpn", use_predefined_servers=False, ) ``` ``` -------------------------------- ### Environment Variables Source: https://context7.com/eduvpn/linux-app/llms.txt Illustrates how to use environment variables to configure the eduVPN client's behavior, such as TCP preference and failover delay. ```APIDOC ## Environment Variables ```bash # Override TCP preference at the OS level (1 = always prefer TCP): export EDUVPN_PREFER_TCP=1 eduvpn-cli connect --number 1 # Adjust the delay (in seconds) before failover detection begins (default: 1): export EDUVPN_FAILOVER_DELAY=3 eduvpn-gui ``` ``` -------------------------------- ### Connect to VPN Server via CLI Source: https://context7.com/eduvpn/linux-app/llms.txt Connect to various types of VPN servers using `eduvpn-cli` or `letsconnect-cli`. Supports searching, direct URLs, organization IDs, and custom servers. Use `--tcp` to force a TCP tunnel. ```console # Connect by searching the discovery list: $ eduvpn-cli connect --search "Delft University" # One server found: "Delft University of Technology" (institute_access) # Do you want to connect to it (y/n): y # Authorization needed. Your browser has been opened with url: https://vpn.tudelft.nl/oauth/authorize?... # Connected. # Connect directly by institute URL: $ eduvpn-cli connect --url https://vpn.example.edu/ # Connect to a Secure Internet org by org ID: $ eduvpn-cli connect --orgid https://idp.surf.nl/ # Connect to a self-hosted (custom) server: $ letsconnect-cli connect --custom-url https://myvpn.example.com/ # Connect using a TCP tunnel (bypass UDP-blocking networks): $ eduvpn-cli connect --search "MyUniversity" --tcp # Connect to a previously configured server by list number: $ eduvpn-cli list # show configured servers with numbers # [1]: Delft University of Technology $ eduvpn-cli connect --number 1 ``` -------------------------------- ### Python API: ApplicationModel.search_predefined() / search_custom() Source: https://context7.com/eduvpn/linux-app/llms.txt Searches for predefined or custom VPN servers. ```APIDOC ### `ApplicationModel.search_predefined()` / `search_custom()` — Search servers Searches the discovery list for predefined servers or custom servers. ```python # Search the discovery list for predefined servers results = list(app.model.search_predefined("delft")) for server in results: print(server) # "Delft University of Technology" ``` ``` -------------------------------- ### Manage configured and discoverable servers Source: https://context7.com/eduvpn/linux-app/llms.txt Manages both previously configured and discoverable VPN servers. It requires an initialized `eduvpn_common.main.EduVPN` instance and can optionally enable server discovery. ```python from eduvpn.server import ServerDatabase, group_servers, ServerGroup import eduvpn_common.main as common from eduvpn.settings import CLIENT_ID, CONFIG_PREFIX _common = common.EduVPN(CLIENT_ID, "4.7.2", str(CONFIG_PREFIX)) _common.register() db = ServerDatabase(_common, enable_discovery=True) # Get all previously configured servers: configured = db.configured for server in configured: print(server, server.category_id) # Search discovery for predefined servers: results = db.disco_update(search="amsterdam") for s in results: print(s) ``` -------------------------------- ### Configuration.load() — Load persistent client settings Source: https://context7.com/eduvpn/linux-app/llms.txt Loads persistent client settings from the default configuration file (`~/.config/eduvpn/config.json`). If the file does not exist, it creates default settings. ```APIDOC ## Configuration.load() ### Description Loads persistent client settings from the default configuration file path (`~/.config/eduvpn/config.json`). If the configuration file is not found, it initializes with default settings. ### Method ```python Configuration.load(config_dir: Path) ``` ### Parameters #### Path Parameters - **config_dir** (Path) - Required - The directory where the configuration file is located or should be created. ### Response #### Success Response (200) - **Configuration** (object) - A `Configuration` object containing the loaded or default client settings. ### Response Example ```python from pathlib import Path from eduvpn.config import Configuration config_dir = Path.home() / ".config" / "eduvpn" config = Configuration.load(config_dir) print(config.allow_wg_lan) # Example: True (default: allow LAN when WireGuard active) print(config.ignore_keyring_warning) # Example: False # Modify a setting (auto-saved to config.json): config.allow_wg_lan = False # Default settings structure: # { # "ignore_keyring_warning": false, # "allow_wg_lan": true, # "proxy_active_warning": null # } ``` ``` -------------------------------- ### Load persistent client settings Source: https://context7.com/eduvpn/linux-app/llms.txt Loads client settings from '~/.config/eduvpn/config.json'. If the file is absent, default settings are used. Modifications to the Configuration object are automatically saved. ```python from pathlib import Path from eduvpn.config import Configuration config_dir = Path.home() / ".config" / "eduvpn" config = Configuration.load(config_dir) print(config.allow_wg_lan) # True (default: allow LAN when WireGuard active) print(config.ignore_keyring_warning) # False # Modify a setting (auto-saved to config.json): config.allow_wg_lan = False # Default settings structure: # { # "ignore_keyring_warning": false, # "allow_wg_lan": true, # "proxy_active_warning": null # } ``` -------------------------------- ### Python API: ApplicationModel.connect() Source: https://context7.com/eduvpn/linux-app/llms.txt Connects to a specified VPN server, handling configuration retrieval and protocol failover. ```APIDOC ### `ApplicationModel.connect()` — Connect to a server Retrieves VPN config from the server, activates the NetworkManager connection, and handles protocol failover (UDP → TCP). ```python from eduvpn.server import Server, InstituteServer # Connect to a custom server server = Server("https://myvpn.example.com/", {"en": "My VPN"}) app.model.add(server) def on_connected(success: bool): if success: print("Connected!") else: print("Connection failed.") app.model.connect(server, callback=on_connected, prefer_tcp=False) # Force TCP (useful on UDP-blocking networks): app.model.connect(server, callback=on_connected, prefer_tcp=True) ``` ``` -------------------------------- ### eduvpn-cli interactive Source: https://context7.com/eduvpn/linux-app/llms.txt Enters an interactive shell mode for managing VPN connections. ```APIDOC ## eduvpn-cli interactive — Interactive shell mode ### Description Starts an interactive command-line interface for managing EduVPN connections, allowing access to various commands within a single session. ### Usage ```bash $ eduvpn-cli interactive # Welcome to the eduVPN interactive commandline # Available commands: change-location, change-profile, connect, disconnect, list, quit, remove, renew, status # [eduVPN]: connect # Do you want to connect to an already configured server? (y/n): y # ... # [eduVPN]: status # Connected to: "Delft University of Technology" (institute_access) # [eduVPN]: quit # Exiting... ``` ``` -------------------------------- ### Search for Servers using Python API Source: https://context7.com/eduvpn/linux-app/llms.txt Search the discovery list for predefined servers using `ApplicationModel.search_predefined()` or custom servers using `search_custom()`. ```python # Search the discovery list for predefined servers results = list(app.model.search_predefined("delft")) for server in results: print(server) # "Delft University of Technology" ``` -------------------------------- ### Interactive Shell Mode with eduvpn-cli Source: https://context7.com/eduvpn/linux-app/llms.txt Enter an interactive shell for executing EduVPN commands. Available commands include connect, disconnect, list, status, and quit. ```bash $ eduvpn-cli interactive # Welcome to the eduVPN interactive commandline # Available commands: change-location, change-profile, connect, disconnect, list, quit, remove, renew, status # [eduVPN]: connect # Do you want to connect to an already configured server? (y/n): y # ... # [eduVPN]: status # Connected to: "Delft University of Technology" (institute_access) # [eduVPN]: quit # Exiting... ``` -------------------------------- ### Enable GUI Debug Logging Source: https://context7.com/eduvpn/linux-app/llms.txt Enables debug mode for the `eduvpn-gui` application. Use `-d` flag. ```console # GUI: enable debug mode: $ eduvpn-gui -d ``` -------------------------------- ### Global CLI Flags for eduvpn-cli Source: https://context7.com/eduvpn/linux-app/llms.txt Utilize global flags such as `--version` for version information, `-d` for debug logging, and `-y` for auto-confirming prompts. ```bash # Show version info: $ eduvpn-cli --version # eduVPN CLI version: 4.7.2 with eduvpn-common version: 5.0.0 ``` ```bash # Enable debug logging to ~/.config/eduvpn/log: $ eduvpn-cli -d connect --number 1 ``` ```bash # Auto-confirm all yes/no prompts (for scripting): $ eduvpn-cli -y connect --search "MyUniversity" ``` -------------------------------- ### ServerDatabase — Manage configured and discoverable servers Source: https://context7.com/eduvpn/linux-app/llms.txt Manages both locally configured VPN servers and servers discoverable through the EduVPN discovery service. Allows updating and searching for servers. ```APIDOC ## ServerDatabase ### Description Manages configured and discoverable servers for the EduVPN client. It allows access to previously configured servers and can search for new servers via the discovery service. ### Initialization ```python ServerDatabase(_common: Any, enable_discovery: bool = True) ``` ### Methods #### `disco_update(search: str = None)` Updates the list of discoverable servers, optionally filtering by a search term. ### Properties #### `configured` (list) Returns a list of all previously configured servers. ### Example ```python from eduvpn.server import ServerDatabase, group_servers, ServerGroup import eduvpn_common.main as common from eduvpn.settings import CLIENT_ID, CONFIG_PREFIX _common = common.EduVPN(CLIENT_ID, "4.7.2", str(CONFIG_PREFIX)) _common.register() db = ServerDatabase(_common, enable_discovery=True) # Get all previously configured servers: configured = db.configured for server in configured: print(server, server.category_id) # Search discovery for predefined servers: results = db.disco_update(search="amsterdam") for s in results: print(s) ``` ```