Skip to main content

Proton VPN CLI for macOS

PyPI CI Coverage Downloads License

A fork of the Proton VPN CLI that adds macOS support.

Better together

They all drive the same connection: connect from one and the others keep up. Use them instead of Proton's Mac app, not alongside it, since it runs its own VPN connection that these can't see or control.

Install

brew install stevelacey/tap/proton-vpn-cli
protonvpn setup

protonvpn setup asks for your Mac password once, so connecting doesn't need it again, then signs you in to your Proton account. Connecting needs root for wg-quick, pfctl and networksetup; setup installs a small root-owned helper that only does those, and only takes plain WireGuard configs. It also copies wg-quick, wg, wireguard-go and bash from Homebrew into a root-owned folder, since anything running as you can change Homebrew's files; the helper only runs those copies and macOS's own commands. Run protonvpn setup again to pick up Homebrew updates to them.

Or install it with uv tool install proton-vpn-cli-macos (or pipx), plus brew install wireguard-tools bash.

Use

protonvpn                          # status
protonvpn swiss                    # fastest server in a country, by name, code or alias
protonvpn fastest
protonvpn random japan
protonvpn sc japan                 # Secure Core; also p2p and tor
protonvpn CH#871                   # a specific server
protonvpn city new york
protonvpn servers ch               # servers by city, least loaded first
protonvpn dns cloudflare           # proton, cloudflare, google, opendns or quad9
protonvpn set kill-switch standard
protonvpn set netshield malware-ads-trackers
protonvpn set port-forwarding on   # prints the forwarded port
protonvpn off
protonvpn help

Proton's own commands and options work too:

protonvpn connect --city "New York" --p2p
protonvpn config set netshield malware-ads-trackers
protonvpn countries list
protonvpn connect --help

How it works

  • Connections are WireGuard, through wg-quick, with the local agent confirming each one and applying NetShield, port forwarding and the rest.
  • The kill switch is pf rules in their own anchor; /etc/pf.conf is left alone.
  • While you're connected, a LaunchAgent runs protonvpn watch in the background, as Proton's apps do while they're open. If the tunnel stops carrying traffic, say when its server goes down, it reconnects to a similar server. It also keeps renewing the forwarded port, which Proton's server only hands out for a minute at a time. It's added the first time you connect, and stops by itself when you disconnect.
  • Switching servers over a dead tunnel disconnects it first, rather than waiting out Proton's API timeouts through it.
  • Sign-in is kept in the macOS Keychain.
  • The release wheel includes the core libraries (macos/vendor) and the Rust extension.

Develop

git clone --recurse-submodules=macos/vendor git@github.com:stevelacey/proton-vpn-cli-macos.git
cd proton-vpn-cli-macos/macos
brew install rust wireguard-tools bash
scripts/build-platform
uv sync
uv run pytest
uv run python -m proton.vpn.macos.vpn setup

License

GPLv3. Copyright (c) 2026 Proton AG; see COPYING, LICENSE and the contribution policy.

Metadata

Release files for proton-vpn-cli-macos 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for proton-vpn-cli-macos 1.2.1
File Interpreter ABI Platform Actions
proton_vpn_cli_macos-1.2.1-cp312-abi3-macosx_11_0_universal2.whl CPython 3.12 abi3 macOS 11.0+ universal2 (ARM64, x86-64) Details for proton_vpn_cli_macos-1.2.1-cp312-abi3-macosx_11_0_universal2.whl

Release files / proton_vpn_cli_macos-1.2.1-cp312-abi3-macosx_11_0_universal2.whl

Download URL proton_vpn_cli_macos-1.2.1-cp312-abi3-macosx_11_0_universal2.whl
Size 3.5 MB
Tags CPython 3.12 abi3 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
8279fa20e702330bc9469065f0dcc638cf352c571d665c28be34e5593e6c9247
BLAKE2b-256 checksum
How to use checksums
979682d60cb3eac0cb2c6f9149650963c9320099f3cb38c69628106cf604a1d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for proton-vpn-cli-macos 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for proton_vpn_cli_macos-1.2.1-cp312-abi3-macosx_11_0_universal2.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page