A terminal UI for managing OpenVPN connections with 2FA support
Project description
vpnx
A terminal UI for managing OpenVPN connections with 2FA support.
Features
- Interactive setup wizard for configuring multiple VPNs
- Full-screen TUI with real-time connection status and bandwidth monitoring
- Secure credential storage using GPG encryption
- Support for up scripts (DNS/routing configuration)
- XDG Base Directory compliant configuration
Requirements
- Python 3.8+
- openvpn
- gpg (for encrypted password storage)
Installation
# Clone the repository
git clone https://github.com/user/vpnx.git
cd vpnx
# Verify system dependencies
make install
Setup
# Run the interactive setup wizard
make setup
The setup wizard will guide you through:
- Adding VPN configurations (name, path to .ovpn file, up script requirement)
- Setting your username (optional - will prompt at connection if not set)
- Configuring the password store (GPG key for secure credential storage)
Usage
# Connect to all configured VPNs
make all
# Connect to a specific VPN
python3 run.py connect <vpn-name>
# List configured VPNs
make list
# Re-run setup to modify configuration
make setup
Configuration
Configuration is stored in XDG-compliant directories:
~/.config/vpnx/
├── config.yaml # Main configuration
└── up.sh # Optional default up script
~/.local/share/vpnx/
├── credentials.gpg # GPG-encrypted password
└── credentials.gpg-id # GPG key ID
~/.cache/vpnx/
└── logs/ # Connection logs
config.yaml format
username: your-username
credentials_path: ~/.local/share/vpnx/credentials
up_script: /path/to/up.sh # Optional global up script
vpns:
- name: PROD
display: Production VPN
config_path: /path/to/prod.ovpn
needs_up_script: true
- name: DEV
display: Development VPN
config_path: /path/to/dev.ovpn
needs_up_script: false
Development
make test # Run tests
make lint # Check code style
make format # Auto-format code
make clean # Remove cache files
Project Structure
├── lib/
│ ├── domain/ # Business logic (entities, services)
│ ├── application/ # Use cases (commands, handlers)
│ ├── infrastructure/ # External integrations (OpenVPN, pass)
│ └── presentation/ # UI components (TUI, CLI)
├── tests/ # Unit tests
├── certificates/ # VPN config files (local)
└── scripts/ # Helper scripts (up.sh)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vpnx-0.1.0.tar.gz.
File metadata
- Download URL: vpnx-0.1.0.tar.gz
- Upload date:
- Size: 43.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9059269d4654e439eca809ba746514687ba0ef0418956c45ae119056d99a4065
|
|
| MD5 |
2df7ef735fa98648cf3db8971fe6bf49
|
|
| BLAKE2b-256 |
52f05b384e3455bc1c0ef4d2e330e22f2d242ab5956dbf3d6851388d5e6483c4
|
Provenance
The following attestation bundles were made for vpnx-0.1.0.tar.gz:
Publisher:
ci.yml on pirhoo/vpnx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vpnx-0.1.0.tar.gz -
Subject digest:
9059269d4654e439eca809ba746514687ba0ef0418956c45ae119056d99a4065 - Sigstore transparency entry: 1050687210
- Sigstore integration time:
-
Permalink:
pirhoo/vpnx@4867191457072bb5848ab75ca26cdbd67bf191de -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pirhoo
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@4867191457072bb5848ab75ca26cdbd67bf191de -
Trigger Event:
release
-
Statement type:
File details
Details for the file vpnx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vpnx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 38.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96461e5d08bcf2d1c992137ce60d25d11bcf8a3836b10944de6ec5ff7757bffd
|
|
| MD5 |
661cb9b7b1ae25ed1efb4688edc4f454
|
|
| BLAKE2b-256 |
e69a983b8c5f24ff2d9ea36d63aedfc2c6a818cff2519905d620ee616dba2aa0
|
Provenance
The following attestation bundles were made for vpnx-0.1.0-py3-none-any.whl:
Publisher:
ci.yml on pirhoo/vpnx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vpnx-0.1.0-py3-none-any.whl -
Subject digest:
96461e5d08bcf2d1c992137ce60d25d11bcf8a3836b10944de6ec5ff7757bffd - Sigstore transparency entry: 1050687216
- Sigstore integration time:
-
Permalink:
pirhoo/vpnx@4867191457072bb5848ab75ca26cdbd67bf191de -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pirhoo
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@4867191457072bb5848ab75ca26cdbd67bf191de -
Trigger Event:
release
-
Statement type: