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.
Metadata
Release files for k-vpn 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| k_vpn-1.0.0.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| k_vpn-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.3 kB
Release files / k_vpn-1.0.0.tar.gz
| Download URL | k_vpn-1.0.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7fa5249a6e7d5e0657de2a73279f7aa7d02e1a69f939871a49600db6e37aeff
|
|
BLAKE2b-256 checksum How to use checksums |
68ae9160b11738440b9514e6fa617e108c01ee3f45f10b57d0b5364f57ca24e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / k_vpn-1.0.0-py3-none-any.whl
| Download URL | k_vpn-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6345e35effb2fa4f409ec2735fd6ddf6b1b533587f9f0f3e4a18506a5b18de0a
|
|
BLAKE2b-256 checksum How to use checksums |
bdda104556243a8966424b3991168716e966a2e2fe01b9f834d3951a06cca7f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|