GlobalProtect-openconnect

yuezkGPL-3.0活跃维护

用 Rust 编写的 GlobalProtect VPN 客户端,支持 macOS、Linux 和 BSD,提供图形界面和命令行,支持 SAML 单点登录、多因素认证、YubiKey 和客户端证书,还能以本地 SOCKS5 代理模式运行。

GlobalProtect VPN client and CLI for macOS, Linux, FreeBSD, and OpenBSD. Built in Rust with SAML SSO, MFA, YubiKey, client certificates, and local SOCKS5 proxy mode.

v3.3.1发布于 2026-11-08 14:22 UTC2,333star +2 / 7 天269fork同步于 2026-11-10 17:46 UTC

怎么上手

由 README 提炼,执行前请确认
brew install --cask yuezk/gp-connect/gp-connect
sudo add-apt-repository ppa:yuezk/globalprotect-openconnect && sudo apt-get update && sudo apt-get install globalprotect-openconnect
硬件要求按 README 说明

README 未说明显存或 CPU 要求;macOS 版要求 Apple silicon 和 macOS 13+,Linux 构建需 Rust 1.91+ 及 webkit2gtk-4.1 或 GTK 4 等依赖

支持 Apple Silicon有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 OpenConnect 的 GlobalProtect VPN 客户端,提供 CLI 和桌面 GUI,支持多平台

用 Rust 编写的 GlobalProtect VPN 客户端,支持 macOS、Linux 和 BSD,提供图形界面和命令行,支持 SAML 单点登录、多因素认证、YubiKey 和客户端证书,还能以本地 SOCKS5 代理模式运行。

核心能力

  • 提供 gpclient 命令行工具和 GP Connect 桌面应用
  • 支持 SAML/SSO、MFA、FIDO2 YubiKey 和客户端证书认证
  • 可选全系统 VPN 隧道或本地 SOCKS5 代理模式
  • 内置 HIP 报告生成,也支持自定义脚本
  • 支持多门户保存和直连网关,Linux 有低内存原生界面

容易踩的坑

CLI 连接需 sudo 权限,Docker 运行需加 --cap-add=NET_ADMIN 和 --device=/dev/net/tun;无桌面或 SSH 环境要用 --browser manual 手动粘贴回调 URL;GUI 是商业软件仅免费试用,只有 gpclient CLI 是 GPL-3.0 开源

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v3.3.1
  1. v3.3.1最新正式版2026-11-08 · 2026-11-08 14:22 UTC

    Improved

    • Made client certificate errors clearer and added more detail to gateway sign-in logs.

    Fixed

    • Restored support for client certificates with private extensions and legacy RC4-encrypted PKCS#12 files.
    • Fixed certificate chain selection for PKCS#12 files containing multiple possible issuers.
    • Fixed certificate validation and recovery guidance in both desktop interfaces.
    • Fixed Native Shell Settings windows failing to activate from the macOS menu or reopening on the wrong page.
    • Fixed keyboard navigation and Escape handling in the macOS Native Shell interface.
    • Fixed AUR package builds and dependency metadata.
  2. v3.3.02026-11-05 · 2026-11-05 15:49 UTC
    查看更新说明

    Added

    • Added Native Shell, a new desktop interface for macOS and Linux. macOS builds now use it by default.
    • Added an Interface setting on Linux to switch between Tauri and Native Shell.
    • Added tray icon appearance options for light and dark desktop panels on Linux, FreeBSD, and OpenBSD.
    • Added in-app feature highlights, with a setting to turn them off.

    Improved

    • Made System VPN and Local Proxy modes selectable directly from the main window.
    • Refined connection details, saved-server selection, keyboard navigation, and dialog appearance.
    • Removed the need for OpenSSL compatibility configuration and external OpenSSL conversion tools.

    Fixed

    • Fixed macOS VPN DNS configuration and cleanup, including split-tunnel connections.
    • Fixed background CLI reconnections failing after the initial connection.
    • Fixed server addresses losing custom ports when pasted as URLs.
    • Fixed gateway login address handling for servers with explicit ports.
    • Fixed browser sign-in registration when desktop-specific settings override the callback handler on Linux, FreeBSD, or OpenBSD.
    • Fixed Okta FastPass failing to open Okta Verify from the embedded sign-in window on Linux, FreeBSD, and OpenBSD.
    • Fixed supplied server certificate pins not being enforced during tunnel setup.
    • Fixed delayed clicks activating a different control after a Native Shell view changed.

    Command-line notes

    • Deprecated --fix-openssl on Linux, FreeBSD, and OpenBSD. Existing commands still accept it, but it has no effect.
  3. v3.2.02026-10-22 · 2026-10-22 16:22 UTC
    查看更新说明

    Added

    • Added Local Proxy mode with configurable SOCKS5 and HTTP listeners, so selected apps can use the VPN without changing system routes or DNS.
    • Added a gateway IP preference for trying IPv4 or IPv6 first, available in Settings and through gpclient connect --ip-preference.

    Improved

    • Enabled switching between the macOS main window and menu bar popover without restarting the app.
    • Refined gateway selection, connection status, and proxy listener details.
    • Made numeric settings validation clearer before saving.

    Fixed

    • Fixed VPN shutdown waiting too long when a gateway stops responding to logout.
    • Fixed segmented controls sometimes losing the selected option when clicked.
    • Fixed app shortcuts failing to open with some Linux and BSD desktop launchers.
    • Fixed invisible desktop icons on systems using older versions of librsvg.
  4. v3.1.02026-10-19 · 2026-10-19 16:25 UTC
    查看更新说明

    Added

    • Added a Connection Details panel showing VPN information and live upload and download activity.
    • Added an optional terminal dashboard showing connection status and logs, enabled with --dashboard.
    • Added client certificate setup in Settings, with guidance when a VPN requires a certificate.

    Improved

    • Refreshed Settings and dialogs, with automatic saving for most settings and Save and Cancel buttons for detailed edits.
    • Made sign-in errors clearer and added recovery options within the app.
    • Added a website address bar to the sign-in window.
    • Expanded support for client certificate files, including password-protected files, with clearer file and password errors.
    • Improved license activation error messages and troubleshooting logs.

    Fixed

    • Fixed sign-in retries losing the selected VPN server after a security error.
    • Fixed mismatched certificate and key files being accepted and replacing a working certificate setup.
    • Fixed failed saves discarding certificate details or custom device report (HIP) edits, allowing a retry without re-entering changes.
    • Fixed theme, automatic-update, and logging settings appearing saved when saving had failed; errors are now shown and previous settings remain in use.
    • Fixed notifications disappearing too quickly on GNOME and clarified notification sender names and update titles.
    • Fixed connection failures with some VPN gateways.

    Command-line notes

    • Renamed copy-and-paste browser sign-in to --browser manual; existing commands using --browser remote still work.
    • Removed the unneeded --fix-openssl option on macOS; existing macOS commands and scripts must omit it.
  5. v3.0.52026-10-13 · 2026-10-13 08:50 UTC
    查看更新说明

    Added

    • Added adaptive macOS app icons for light and dark appearances.

    Fixed

    • Fixed macOS browser sign-in by automatically selecting the installed callback handler.
    • Improved app icon proportions in Finder and across the app, installer, and website.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    GlobalProtect-openconnect

    A GlobalProtect VPN client built on OpenConnect. It provides command-line tools (gpclient) and the GP Connect desktop application for macOS, Linux, FreeBSD, and OpenBSD.

    Disclaimer: GP Connect is an independent third-party client for GlobalProtect VPN networks. It is not affiliated with or endorsed by Palo Alto Networks, Inc.

    Inspired by gp-saml-gui

    Table of Contents

    Features

    • Multi-Platform – macOS (Apple silicon), Linux, FreeBSD, and OpenBSD
    • Dual Interfaces – Fast terminal CLI (gpclient) and desktop GUI (GP Connect)
    • Native Shell on Linux – Ultra-low-memory native desktop GUI alongside the webview interface
    • Flexible Routing – Full System VPN tunnel or local SOCKS5 proxy mode
    • Modern Authentication – SAML / SSO, MFA, FIDO2 (YubiKey), client certificates, and external browser login
    • Automated HIP Reports – Built-in HIP report generation or custom scripts
    • Multi-Portal & Direct Gateway – Manage multiple saved portals or connect directly to a gateway
    • Desktop Integration – Theme-aware system tray icon, auto-connect on launch, and reconnect on wake

    Usage

    Command-Line Interface

    The open-source gpclient CLI handles authentication, connection lifecycle, and HIP generation:

    # Connect to a portal server
    sudo gpclient connect <portal>
    
    # Connect using browser authentication (SSO / SAML)
    sudo gpclient connect <portal> --browser
    
    # Connect directly to a gateway server
    sudo gpclient connect <gateway> --as-gateway
    
    # Connect with automatic HIP report generation
    sudo gpclient connect <portal> --hip
    
    # Headless / remote server authentication (prints auth URL to open in any browser)
    sudo gpclient connect <portal> --browser manual
    
    # Disconnect
    sudo gpclient disconnect
    

    Run gpclient --help or gpclient <command> --help to view all available commands and options.

    Graphical User Interface

    • macOS: Open GP Connect from Applications.
    • Linux / BSD: Launch GP Connect from your application menu or run:
      gpclient launch-gui
      

    [!TIP] On Linux, try Native Shell for lower memory usage. Switch between Native Shell and Tauri in Settings → General → Interface.

    Installation

    macOS

    Requires Apple silicon and macOS 13+. Includes both GP Connect and the gpclient CLI.

    Option 1: Homebrew (Recommended)
    brew install --cask yuezk/gp-connect/gp-connect
    
    Option 2: DMG Installer

    Download the .dmg from the releases page and drag GP Connect into Applications.

    Debian / Ubuntu

    Option 1: PPA (Recommended)
    sudo add-apt-repository ppa:yuezk/globalprotect-openconnect
    sudo apt-get update
    sudo apt-get install globalprotect-openconnect
    
    Option 2: DEB Package

    Download the latest .deb from the releases page:

    sudo apt install ./globalprotect-openconnect_*.deb
    

    Arch Linux / Manjaro

    # Official Extra repository
    sudo pacman -S globalprotect-openconnect
    
    # AUR (git main)
    yay -S globalprotect-openconnect-git
    

    Fedora / RHEL

    Enable the COPR repository:

    sudo dnf copr enable yuezk/globalprotect-openconnect
    sudo dnf install globalprotect-openconnect
    

    openSUSE

    Packages are available on the openSUSE Build Service. Follow the OBS instructions for your distribution.

    Alpine Linux

    Download the latest .apk package from the releases page:

    sudo apk add --allow-untrusted globalprotect-openconnect-*.apk
    

    (Requires community repository enabled for WebKitGTK and AppIndicator dependencies).

    FreeBSD

    Download the latest FreeBSD package from the releases page:

    sudo pkg install ./globalprotect-openconnect-*-freebsd-*.pkg
    

    OpenBSD

    Download the latest OpenBSD package from the releases page:

    doas pkg_add -D unsigned ./globalprotect-openconnect-*-openbsd-*.tgz
    

    Gentoo

    Available via the guru repository:

    sudo eselect repository enable guru
    sudo emerge --sync guru
    sudo emerge --ask net-vpn/GlobalProtect-openconnect
    

    NixOS

    Add the flake to your flake.nix:

    {
      inputs.globalprotect-openconnect.url = "github:yuezk/GlobalProtect-openconnect";
    
      outputs = { self, nixpkgs, globalprotect-openconnect, ... }: {
        nixosConfigurations.<hostname> = nixpkgs.lib.nixosSystem {
          modules = [
            globalprotect-openconnect.nixosModules.default
            {
              programs.globalprotect-openconnect.enable = true;
            }
          ];
        };
      }
    }
    

    Apply changes:

    sudo nixos-rebuild switch
    

    Docker

    Run the CLI client in an official Alpine container:

    docker run --rm -it --cap-add=NET_ADMIN --device=/dev/net/tun \
      yuezk/globalprotect-openconnect:latest \
      connect <portal> --browser manual
    

    (Add --network host on Linux if VPN routes should apply to the host network).

    Other Distributions

    Download globalprotect-openconnect_${version}_${arch}.bin.tar.xz from the releases page:

    tar -xJf globalprotect-openconnect_*.bin.tar.xz
    cd globalprotect-openconnect_*
    sudo make install
    

    Building from Source

    Prerequisites (Linux)

    • Rust 1.91 or later
    • Build tools: make, pkg-config, autoconf, automake, libtool, gettext
    • Libraries: gmp, gnutls, nettle, libxml2, zlib, lz4, p11-kit, libsecret, and webkit2gtk-4.1 (or GTK 4 for Native Shell)
    • Polkit (pkexec) for privileged tunnel setup

    (For FreeBSD and OpenBSD instructions, see Building from Source on FreeBSD and OpenBSD).

    Build Steps

    git clone --recursive https://github.com/yuezk/GlobalProtect-openconnect.git
    cd GlobalProtect-openconnect
    make build
    sudo make install
    

    Build Options:

    • INCLUDE_GUI=1 – Download and install the matching desktop application bundle.
    • BUILD_WEBVIEW_AUTH=0 – Build gpauth without embedded browser authentication (uses external browser or manual mode).
    • BUILD_GUI_HELPER=0 – Skip building the helper UI.

    Troubleshooting

    • Headless / Remote Login: When running without a desktop display or over SSH, use --browser manual. Open the printed URL in any browser and paste the callback URL back into the terminal.
    • Diagnostics: If you encounter issues, run gpclient diagnostics or follow the diagnostics guide when opening an issue.

    NetworkManager Integration

    Licensing

    • CLI (gpclient): Free and open source (GPL-3.0).
    • GUI (GP Connect): Commercial desktop application with a free trial.

    Open Source Components

    ComponentTypeLicense
    gpapiCrateMIT
    openconnectRust wrapper crateMIT
    upstream OpenConnectC libraryLGPL-2.1
    commonCrateMIT
    browser-launcherCrateMIT
    authCrateGPL-3.0
    gpserviceApplicationGPL-3.0
    gpclientApplicationGPL-3.0
    gpauthApplicationGPL-3.0
    gpgui-helperApplicationGPL-3.0