A NetworkManager VPN plugin for AirVPN, in the
spirit of networkmanager-openvpn. Instead of importing generated
.ovpn files by hand, you store your AirVPN API key and pick a
server; the plugin fetches ready-to-use OpenVPN profiles from the
AirVPN configuration generator and drives the openvpn binary.
- Native AirVPN connection type in GNOME Settings (GTK4),
nm-connection-editor (GTK3), nm-applet and
nmcli. - Server picker fed by the AirVPN status API (continents, countries and individual servers with their current load), with a Refresh button.
- Profiles are fetched once and cached under
/var/lib/nm-airvpn/(root-only,0600); the cache is refreshed automatically on the first connect, when the connection parameters change, when a connection attempt fails, or after 90 days. - API key stored as a NetworkManager secret (GNOME keyring by default); GNOME Shell prompts for it via the standard VPN secret dialog when it is not saved.
- OpenVPN runs with dropped privileges (dedicated
nm-airvpnsystem user) once the tunnel is up.
- Sign in at airvpn.org/apisettings.
- Enable API access for your account and copy the key.
- Paste it in the connection editor (or answer the GNOME Shell prompt on first connect).
The optional device name corresponds to an AirVPN "device" (Client Area → Devices); each device gets its own keypair. Leave it empty to use your account's default device. In the editor, press Load devices to pick one of your account's devices from the dropdown (requires the API key entered above).
The device must exist on your account.
GUI: GNOME Settings → Network → VPN → + → AirVPN, or
nm-connection-editor.
CLI:
nmcli connection add type vpn ifname -- vpn-type airvpn con-name my-airvpn \
vpn.data "server=ch,protocol=udp,port=443,device=mydevice"
nmcli connection modify my-airvpn vpn.secrets api-key=YOUR_API_KEY
nmcli connection up my-airvpnserver accepts an AirVPN server name (Achernar), a country code
(ch), a continent (europe) or earth.
meson setup build --prefix /usr -Dlibexecdir=lib -Dlocalstatedir=/var
meson compile -C build
sudo meson install -C build
sudo systemd-sysusers && sudo systemd-tmpfiles --createDependencies: libnm, glib2, libcurl, openvpn; for the GUI:
gtk3, gtk4, libnma, libnma-gtk4, libsecret, json-glib.
Build with -Dgnome=false for a headless (nmcli-only) install.
On Arch, use the provided PKGBUILD (makepkg -si).
| Option | Default | Description |
|---|---|---|
gnome |
true |
Build the GTK editors and the auth dialog |
gtk4 |
true |
Build the GTK4 editor (GNOME Settings needs it) |
Profiles (including the device private key) live in
/var/lib/nm-airvpn/<connection-uuid>/. Deleting a connection does not
remove its cache; clean up manually with
sudo rm -rf /var/lib/nm-airvpn/<uuid> if needed.
GPL-2.0-or-later. Portions derived from NetworkManager-openvpn and NetworkManager-fortisslvpn (Red Hat, Inc. and contributors).