https://github.com/roryl23/pypvpnctl
ProtonVPN interface for Python
https://github.com/roryl23/pypvpnctl
protonvpn python3
Last synced: 3 months ago
JSON representation
ProtonVPN interface for Python
- Host: GitHub
- URL: https://github.com/roryl23/pypvpnctl
- Owner: roryl23
- Created: 2020-04-04T07:19:06.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-19T14:21:08.000Z (about 4 years ago)
- Last Synced: 2025-01-18T16:48:34.242Z (5 months ago)
- Topics: protonvpn, python3
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python ProtonVPN Controller for Linux
Provides a Python interface for controlling the
[ProtonVPN CLI](https://protonvpn.com/support/linux-vpn-tool/) client in Linux.# Installation
`pip install git+https://github.com/rory-linehan/pypvpnctl`
# Usage
```python
import pypvpnctl
import time
for name in ['us-tx-01', 'us-tx-02', 'us-tx-03']:
status, message, result = pypvpnctl.connect(name, 'tcp')
if status is True:
time.sleep(600)
status, message, result = pypvpnctl.disconnect()
if status is False:
print(message + ': ' + str(result.stdout))
else:
print(message + ': ' + str(result.stdout))
sys.exit(1)
```