Skip to main content

A terminal UI for managing OpenVPN connections with 2FA support

Project description

vpnx

A terminal UI for managing OpenVPN connections with 2FA support.

README

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:

  1. Adding VPN configurations (name, path to .ovpn file, up script requirement)
  2. Setting your username (optional - will prompt at connection if not set)
  3. 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

vpnx-0.1.0.tar.gz (43.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vpnx-0.1.0-py3-none-any.whl (38.9 kB view details)

Uploaded Python 3

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

Hashes for vpnx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9059269d4654e439eca809ba746514687ba0ef0418956c45ae119056d99a4065
MD5 2df7ef735fa98648cf3db8971fe6bf49
BLAKE2b-256 52f05b384e3455bc1c0ef4d2e330e22f2d242ab5956dbf3d6851388d5e6483c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for vpnx-0.1.0.tar.gz:

Publisher: ci.yml on pirhoo/vpnx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for vpnx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96461e5d08bcf2d1c992137ce60d25d11bcf8a3836b10944de6ec5ff7757bffd
MD5 661cb9b7b1ae25ed1efb4688edc4f454
BLAKE2b-256 e69a983b8c5f24ff2d9ea36d63aedfc2c6a818cff2519905d620ee616dba2aa0

See more details on using hashes here.

Provenance

The following attestation bundles were made for vpnx-0.1.0-py3-none-any.whl:

Publisher: ci.yml on pirhoo/vpnx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page