Skip to main content

Automated CLI tool to fetch and connect to global VPN Gate servers securely.

Project description

k-vpn

k-vpn is a modern, automated CLI tool designed to easily fetch and connect to public VPN Gate servers directly from your terminal. Built with Python, Typer, and Rich, it offers a beautiful and interactive experience for securing your connection.

Features

  • Automated Fetching: Retrieves the latest list of public VPN servers from VPN Gate.
  • Rich UI: Displays server availability by country in a formatted table.
  • Interactive Selection: Easily choose your desired country.
  • Secure Connection: Automates the OpenVPN connection process using temporary configuration files.
  • Smart Defaults: Filters for high-speed, uptime-reliable servers.

Prerequisites

  • Python 3.8+
  • OpenVPN: Must be installed and accessible via sudo openvpn on your system.
  • uv: Recommended for project management and execution.

Installation & Usage

It is recommended to use uv to run this tool directly without manual environment setup.

  1. Clone the repository:

    git clone https://github.com/KpihX/k-vpn.git
    cd k-vpn
    
  2. Run the tool:

    uv run k-vpn.py
    

    The tool will verify your environment, fetch the server list, and present you with options.

How it Works

  1. Fetch: The tool downloads the CSV list from http://www.vpngate.net/api/iphone/.
  2. Parse & Filter: It parses the data, filtering for valid OpenVPN configurations.
  3. Display: Aggregates servers by country and displays a summary table (Country, Server Count).
  4. Connect:
    • You select a country by its index.
    • The tool picks the best server (based on score/speed) for that country.
    • It decodes the base64 OpenVPN configuration.
    • It creates a temporary .ovpn file.
    • It executes sudo openvpn --config <temp_file> to establish the tunnel.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This tool uses public servers from VPN Gate. The availability, speed, and security of these servers are not guaranteed by the author. Use at your own risk.

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

k_vpn-1.0.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

k_vpn-1.0.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file k_vpn-1.0.0.tar.gz.

File metadata

  • Download URL: k_vpn-1.0.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for k_vpn-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d7fa5249a6e7d5e0657de2a73279f7aa7d02e1a69f939871a49600db6e37aeff
MD5 10024c0b3186bb1c36623d96dcd7fcec
BLAKE2b-256 68ae9160b11738440b9514e6fa617e108c01ee3f45f10b57d0b5364f57ca24e3

See more details on using hashes here.

File details

Details for the file k_vpn-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: k_vpn-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for k_vpn-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6345e35effb2fa4f409ec2735fd6ddf6b1b533587f9f0f3e4a18506a5b18de0a
MD5 2008335536d73cbd356087b67d153acb
BLAKE2b-256 bdda104556243a8966424b3991168716e966a2e2fe01b9f834d3951a06cca7f9

See more details on using hashes here.

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