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 openvpnon 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.
-
Clone the repository:
git clone https://github.com/KpihX/k-vpn.git cd k-vpn
-
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
- Fetch: The tool downloads the CSV list from
http://www.vpngate.net/api/iphone/. - Parse & Filter: It parses the data, filtering for valid OpenVPN configurations.
- Display: Aggregates servers by country and displays a summary table (Country, Server Count).
- 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
.ovpnfile. - 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
Release history Release notifications | RSS feed
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7fa5249a6e7d5e0657de2a73279f7aa7d02e1a69f939871a49600db6e37aeff
|
|
| MD5 |
10024c0b3186bb1c36623d96dcd7fcec
|
|
| BLAKE2b-256 |
68ae9160b11738440b9514e6fa617e108c01ee3f45f10b57d0b5364f57ca24e3
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6345e35effb2fa4f409ec2735fd6ddf6b1b533587f9f0f3e4a18506a5b18de0a
|
|
| MD5 |
2008335536d73cbd356087b67d153acb
|
|
| BLAKE2b-256 |
bdda104556243a8966424b3991168716e966a2e2fe01b9f834d3951a06cca7f9
|