https://github.com/Rafficer/linux-cli-community
Linux command-line client for ProtonVPN. Written in Python.
https://github.com/Rafficer/linux-cli-community
linux openvpn protonvpn protonvpn-cli python python3 vpn
Last synced: 14 days ago
JSON representation
Linux command-line client for ProtonVPN. Written in Python.
- Host: GitHub
- URL: https://github.com/Rafficer/linux-cli-community
- Owner: Rafficer
- License: gpl-3.0
- Created: 2019-09-30T15:43:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-12T16:53:20.000Z (3 months ago)
- Last Synced: 2025-04-13T21:33:49.467Z (23 days ago)
- Topics: linux, openvpn, protonvpn, protonvpn-cli, python, python3, vpn
- Language: Python
- Homepage: https://protonvpn.com
- Size: 709 KB
- Stars: 1,347
- Watchers: 49
- Forks: 205
- Open Issues: 140
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Authors: AUTHORS
Awesome Lists containing this project
- awesome-useful-projects - <img src="https://icon.horse/icon/github.com" height="20px" align="center"/>/Rafficer/proton-cli-community - Linux command-line client for ProtonVPN (Privacy/Security / Other)
- awesome-repositories - Rafficer/linux-cli-community - Linux command-line client for ProtonVPN. Written in Python. (Python)
- awesome-useful-projects - <img src="https://icon.horse/icon/github.com" height="20px" align="center"/>/Rafficer/proton-cli-community - Linux command-line client for ProtonVPN (Privacy/Security / Other)
README
ProtonVPN-CLI
![]()
A Linux CLI for ProtonVPN. Written in Python.
ProtonVPN-CLI is a full rewrite of the [bash protonvpn-cli](https://github.com/ProtonVPN/protonvpn-cli/blob/master/protonvpn-cli.sh) in Python, which adds more features and functionality with the purpose of improving readability, speed and reliability.
## Deprecation notice
Proton VPN is upgrading its OpenVPN infrastructure. This means the legacy OpenVPN configuration will stop working on 31 March 2025. After this date, you’ll need to switch to the [official Proton VPN for Linux app](https://protonvpn.com/support/linux-vpn-setup/), or reconfigure [OpenVPN](https://protonvpn.com/support/vpn-config-download/) or [WireGuard](https://protonvpn.com/support/wireguard-configurations/) manually.## Installation & Updating
For more detailed information on installing, updating and uninstalling, please view the extensive [usage guide](https://github.com/ProtonVPN/linux-cli-community/blob/master/USAGE.md#installation--updating).
### Installing from distribution repositories
For the following Linux distribution(s), install the official `protonvpn-cli` package:
#### Fedora
```sh
sudo dnf install -y protonvpn-cli
```#### CentOS & RHEL
`protonvpn-cli` is available for CentOS/RHEL 7.x and 8.x via the [EPEL repositories](https://fedoraproject.org/wiki/EPEL).
**For CentOS/RHEL 7.x**:
```sh
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install protonvpn-cli
```**For CentOS/RHEL 8.x**:
```sh
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf install -y protonvpn-cli
```### Installing from PyPI
#### Installing Dependencies
**Dependencies:**
- openvpn
- dialog (optional, needed for interactive selection)
- pip for python3 (pip3)
- python3.5+
- setuptools for python3 (python3-setuptools)Depending on your distribution, run the appropriate following command to install the necessary dependencies
| **Distro** | **Command** |
|:----------------------------------------|:------------------------------------------------ |
|Fedora/CentOS/RHEL | `sudo dnf install -y openvpn dialog python3-pip python3-setuptools`|
|Ubuntu/Linux Mint/Debian and derivatives | `sudo apt install -y openvpn dialog python3-pip python3-setuptools`|
|OpenSUSE/SLES | `sudo zypper in -y openvpn dialog python3-pip python3-setuptools` |
|Arch Linux/Manjaro | `sudo pacman -S openvpn dialog python-pip python-setuptools` |#### Installing ProtonVPN-CLI
Installation happens via Python's package manager PIP.
*Note: Make sure to run pip with sudo, so it installs globally and recognizes the command with sudo*
`sudo pip3 install protonvpn-cli`
#### Updating ProtonVPN-CLI
`sudo pip3 install protonvpn-cli --upgrade`
### Manual Installation from source
*Disclaimer: If you are unsure about what you're doing, please follow the [normal installation guide](https://github.com/ProtonVPN/linux-cli-community/blob/master/USAGE.md#installation--updating).*
It is recommended to do the manual installation in a virtual environment. Especially if it serves the purpose of developing.
1. Clone this repository
`git clone https://github.com/ProtonVPN/linux-cli-community`
2. Step into the directory
`cd linux-cli`
3. Install
`pip3 install -e .`
For updating, you just need to pull the latest version of the repository with git.
### How to use
#### For more detailed information, see the extensive [usage guide](https://github.com/ProtonVPN/linux-cli-community/blob/master/USAGE.md).
| **Command** | **Description** |
|:----------------------------------|:------------------------------------------------------|
|`protonvpn init` | Initialize ProtonVPN profile. |
|`protonvpn connect, c` | Select a ProtonVPN server and connect to it. |
|`protonvpn c [servername]` | Connect to a specified server. |
|`protonvpn c -r` | Connect to a random server. |
|`protonvpn c -f` | Connect to the fastest server. |
|`protonvpn c --p2p` | Connect to the fastest P2P server. |
|`protonvpn c --cc [countrycode]` | Connect to the fastest server in a specified country. |
|`protonvpn c --sc` | Connect to the fastest Secure Core server. |
|`protonvpn reconnect, r` | Reconnect or connect to the last server used. |
|`protonvpn disconnect, d` | Disconnect the current session. |
|`protonvpn status, s` | Print connection status. |
|`protonvpn configure` | Change CLI configuration. |
|`protonvpn refresh` | Refresh OpenVPN configuration and server data. |
|`protonvpn examples` | Print example commands. |
|`protonvpn --version` | Display version. |
|`protonvpn --help` | Show help message. |All connect options can be used with the `-p` flag to explicitly specify which transmission protocol is used for that connection (either `udp` or `tcp`).
## Contributing
If you want to contribute to this project, please read the [contribution guide](https://github.com/ProtonVPN/linux-cli-community/blob/master/CONTRIBUTING.md).