protonvpn-cli-connect
Connect to ProtonVPN server
TLDR
Connect to ProtonVPN interactively
Connect to ProtonVPN using the fastest server available
Connect to ProtonVPN using a specific server with a specific protocol
Connect to ProtonVPN using a random server with a specific protocol
Connect to ProtonVPN using the fastest Tor-supporting server
Display help
SYNOPSIS
protonvpn-cli connect [ <country_code> | <city_name> | <server_name> ] [ OPTIONS ]
protonvpn-cli connect --fastest [ OPTIONS ]
protonvpn-cli connect --random [ OPTIONS ]
protonvpn-cli connect --p2p [ OPTIONS ]
protonvpn-cli connect --tor [ OPTIONS ]
protonvpn-cli connect --secure-core [ OPTIONS ]
PARAMETERS
<country_code>
Connects to the fastest server in the specified country (e.g., CH, US).
<city_name>
Connects to the fastest server in the specified city (e.g., Zurich, New York).
<server_name>
Connects to a specific server by its name (e.g., CH-DE#3, US-NY#1).
--fastest
Connects to the fastest available server based on current network conditions. This is the default if no arguments are provided.
--random
Connects to a random available server.
--p2p
Connects to the fastest available P2P-optimized server.
--tor
Connects to the fastest available Tor-optimized server.
--secure-core
Connects to the fastest available Secure Core server.
--exit-country <country_code>
When using --secure-core, specifies the exit country for the connection.
--protocol {udp|tcp|wireguard}
Specifies the VPN protocol to use for the connection. Defaults to WireGuard if available, then UDP, then TCP.
--no-kill-switch
Disables the kill switch for the current connection, overriding the global setting.
--no-dns-leak-protection
Disables DNS leak protection for the current connection, overriding the global setting.
-v, --verbose
Displays more detailed output during the connection process.
-d, --debug
Displays debug information, useful for troubleshooting.
DESCRIPTION
The protonvpn-cli connect command is the core function of the ProtonVPN Linux command-line interface, enabling users to establish a secure VPN connection to the ProtonVPN network. It abstracts the complexities of OpenVPN or WireGuard configurations, allowing users to simply specify their desired connection parameters such as a country, city, specific server, or connection type (e.g., fastest, random, P2P, Tor, Secure Core). The command intelligently selects the best server based on criteria and protocol preferences. It also integrates with features like Kill Switch and DNS leak protection, ensuring a high level of privacy and security by preventing accidental data exposure. This command is essential for seamless, automated, and flexible VPN management on Linux systems.
CAVEATS
Using protonvpn-cli connect requires the protonvpn-cli client to be properly installed and configured. Users must be logged in using protonvpn-cli login. The command typically requires root privileges (via sudo) to modify network settings. Certain connection types (P2P, Tor, Secure Core) may require a paid ProtonVPN subscription. Underlying dependencies like OpenVPN or WireGuard must also be installed on the system.
PREREQUISITES
Before using protonvpn-cli connect, ensure the protonvpn-cli client is installed, the user has successfully authenticated via protonvpn-cli login, and necessary VPN backend software (like OpenVPN or WireGuard) is also installed and accessible.
AUTOMATIC RECONNECTION & KILL SWITCH
The ProtonVPN CLI often attempts to automatically reconnect if the VPN connection drops, enhancing reliability. When globally enabled via protonvpn-cli settings, the Kill Switch feature ensures that all network traffic is blocked if the VPN connection fails, preventing accidental IP leaks. These can be temporarily overridden for a specific connection using --no-kill-switch or --no-dns-leak-protection.
HISTORY
ProtonVPN launched its official Linux CLI in 2017, providing a dedicated and robust command-line interface for managing VPN connections. This significantly improved the user experience for Linux users, replacing manual OpenVPN configurations. The CLI, and specifically the connect command, has evolved over time, adding crucial features like WireGuard support, a Kill Switch, DNS leak protection, and integrating with system services like systemd for better stability and auto-start capabilities. The connect command remains central to its functionality, providing a simplified yet powerful way to establish complex VPN connections.