mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 14:36:15 -05:00
doc: update OpenBSD/FreeBSD instructions
This commit is contained in:
3 files changed
+186
-1
No files matched your search
@@ -72,7 +72,7 @@ For browser-based authentication with the CLI:
|
|||||||
|
|
||||||
**Method 1:** Using sudo with environment preservation:
|
**Method 1:** Using sudo with environment preservation:
|
||||||
```bash
|
```bash
|
||||||
sudo -E gpclient connect --browser <portal>
|
sudo gpclient connect --browser <portal>
|
||||||
```
|
```
|
||||||
|
|
||||||
**Method 2:** Using authentication piping:
|
**Method 2:** Using authentication piping:
|
||||||
@@ -200,6 +200,26 @@ sudo apk add --allow-untrusted globalprotect-openconnect-*.apk
|
|||||||
|
|
||||||
The package uses Alpine's native musl build. Make sure the `community` repository is enabled so GUI dependencies such as `webkit2gtk-4.1`, `libsecret`, and `libayatana-appindicator` can be resolved. GUI-launched connections use polkit, and VPN tunnel creation requires `/dev/net/tun`.
|
The package uses Alpine's native musl build. Make sure the `community` repository is enabled so GUI dependencies such as `webkit2gtk-4.1`, `libsecret`, and `libayatana-appindicator` can be resolved. GUI-launched connections use polkit, and VPN tunnel creation requires `/dev/net/tun`.
|
||||||
|
|
||||||
|
### FreeBSD
|
||||||
|
|
||||||
|
Download the latest FreeBSD package from the [releases](https://github.com/yuezk/GlobalProtect-openconnect/releases) page, then install:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo pkg install ./globalprotect-openconnect-*-freebsd-*.pkg
|
||||||
|
```
|
||||||
|
|
||||||
|
To build from source, see [Building from Source on FreeBSD and OpenBSD](./docs/bsd-source-build.md).
|
||||||
|
|
||||||
|
### OpenBSD
|
||||||
|
|
||||||
|
Download the latest OpenBSD package from the [releases](https://github.com/yuezk/GlobalProtect-openconnect/releases) page, then install:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
doas pkg_add -D unsigned ./globalprotect-openconnect-*-openbsd-*.tgz
|
||||||
|
```
|
||||||
|
|
||||||
|
To build from source, see [Building from Source on FreeBSD and OpenBSD](./docs/bsd-source-build.md).
|
||||||
|
|
||||||
### Gentoo
|
### Gentoo
|
||||||
|
|
||||||
Available via the `guru` and `lamdness` overlays:
|
Available via the `guru` and `lamdness` overlays:
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
# Building from Source on FreeBSD and OpenBSD
|
||||||
|
|
||||||
|
This guide builds the open-source components from the `GlobalProtect-openconnect` repository on FreeBSD or OpenBSD.
|
||||||
|
|
||||||
|
## Workspace
|
||||||
|
|
||||||
|
Clone `GlobalProtect-openconnect`:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mkdir gp-build
|
||||||
|
cd gp-build
|
||||||
|
git clone --recurse-submodules https://github.com/yuezk/GlobalProtect-openconnect.git gp
|
||||||
|
```
|
||||||
|
|
||||||
|
## FreeBSD
|
||||||
|
|
||||||
|
Install build and runtime dependencies:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo pkg install git rust libiconv gettext-tools autoconf automake libtool patch \
|
||||||
|
gmake pkgconf libxml2 gnutls p11-kit nettle gmp gnome-keyring \
|
||||||
|
libayatana-appindicator polkit webkit2-gtk_41
|
||||||
|
```
|
||||||
|
|
||||||
|
Build and install:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd gp
|
||||||
|
cargo build --release --workspace
|
||||||
|
|
||||||
|
sudo gmake install-bsd
|
||||||
|
```
|
||||||
|
|
||||||
|
Verify the installed binaries:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
gpclient --version
|
||||||
|
gpauth --version
|
||||||
|
```
|
||||||
|
|
||||||
|
## OpenBSD
|
||||||
|
|
||||||
|
Install build and runtime dependencies:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
doas pkg_add git rust libiconv gettext-tools autoconf-2.72 automake-1.17 \
|
||||||
|
libtool patch gmake pkgconf libxml gnutls p11-kit nettle gmp \
|
||||||
|
gnome-keyring polkit webkitgtk41
|
||||||
|
```
|
||||||
|
|
||||||
|
Use the installed Autoconf and Automake versions:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
export AUTOCONF_VERSION=2.72
|
||||||
|
export AUTOMAKE_VERSION=1.17
|
||||||
|
```
|
||||||
|
|
||||||
|
If your shell cannot resolve the versioned tools automatically, add the usual unversioned command links:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
doas ln -sf /usr/local/bin/autoreconf-2.72 /usr/local/bin/autoreconf
|
||||||
|
doas ln -sf /usr/local/bin/autoconf-2.72 /usr/local/bin/autoconf
|
||||||
|
doas ln -sf /usr/local/bin/autoheader-2.72 /usr/local/bin/autoheader
|
||||||
|
doas ln -sf /usr/local/bin/autom4te-2.72 /usr/local/bin/autom4te
|
||||||
|
doas ln -sf /usr/local/bin/aclocal-1.17 /usr/local/bin/aclocal
|
||||||
|
doas ln -sf /usr/local/bin/automake-1.17 /usr/local/bin/automake
|
||||||
|
```
|
||||||
|
|
||||||
|
Build and install:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd gp
|
||||||
|
cargo build --release --workspace
|
||||||
|
|
||||||
|
doas gmake install-bsd
|
||||||
|
```
|
||||||
|
|
||||||
|
Verify the installed binaries:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
gpclient --version
|
||||||
|
gpauth --version
|
||||||
|
```
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
After installation, check the CLI help:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
gpclient --help
|
||||||
|
```
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
# GlobalProtect-openconnect Docker image
|
||||||
|
|
||||||
|
This image provides the GlobalProtect-openconnect command-line tools on Alpine Linux. It includes:
|
||||||
|
|
||||||
|
- `gpclient` - connect to and disconnect from GlobalProtect VPN portals and gateways
|
||||||
|
- `gpauth` - complete authentication separately and pipe the result into `gpclient`
|
||||||
|
|
||||||
|
The image does not include embedded webview authentication, `gpgui-helper`, or the graphical `gpgui` application.
|
||||||
|
|
||||||
|
## Pull
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker pull yuezk/globalprotect-openconnect:<version>
|
||||||
|
```
|
||||||
|
|
||||||
|
Release images are tagged as `vX.Y.Z`, `X.Y.Z`, and `latest`.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
VPN tunnel creation requires access to `/dev/net/tun` and the `NET_ADMIN` capability:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --rm -it --cap-add=NET_ADMIN --device=/dev/net/tun \
|
||||||
|
yuezk/globalprotect-openconnect:<version> \
|
||||||
|
connect <portal> --cookie-on-stdin
|
||||||
|
```
|
||||||
|
|
||||||
|
For browser authentication in a headless environment, use remote browser authentication:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --rm -it --cap-add=NET_ADMIN --device=/dev/net/tun \
|
||||||
|
yuezk/globalprotect-openconnect:<version> \
|
||||||
|
connect <portal> --browser remote
|
||||||
|
```
|
||||||
|
|
||||||
|
On a Linux host, add host networking if the VPN routes should affect the host network namespace:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --rm -it --network host --cap-add=NET_ADMIN --device=/dev/net/tun \
|
||||||
|
yuezk/globalprotect-openconnect:<version> \
|
||||||
|
connect <portal> --browser remote
|
||||||
|
```
|
||||||
|
|
||||||
|
Without `--network host`, the VPN connection stays inside the container network namespace. Docker Desktop on macOS and Windows does not make the host use the VPN through `--network host`; run `gpclient` on the host or use a container gateway setup for host traffic.
|
||||||
|
|
||||||
|
You can also run `gpauth` separately and pipe its remote-browser output into `gpclient`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --rm -it --entrypoint gpauth yuezk/globalprotect-openconnect:<version> \
|
||||||
|
<portal> --browser remote 2>/dev/null \
|
||||||
|
| docker run --rm -i --cap-add=NET_ADMIN --device=/dev/net/tun \
|
||||||
|
yuezk/globalprotect-openconnect:<version> \
|
||||||
|
connect <portal> --cookie-on-stdin
|
||||||
|
```
|
||||||
|
|
||||||
|
## Common commands
|
||||||
|
|
||||||
|
Show top-level help:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --rm yuezk/globalprotect-openconnect:<version> --help
|
||||||
|
```
|
||||||
|
|
||||||
|
Show help for a command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --rm yuezk/globalprotect-openconnect:<version> help connect
|
||||||
|
```
|
||||||
|
|
||||||
|
## Project
|
||||||
|
|
||||||
|
GlobalProtect-openconnect is a modern GlobalProtect VPN client for Linux, built on OpenConnect with support for SSO, non-SSO, FIDO2, client certificate authentication, multiple portals and gateways, and direct gateway connections.
|
||||||
|
|
||||||
|
Source: https://github.com/yuezk/GlobalProtect-openconnect
|
||||||
Reference in new issue
Block a user