A client for connecting to vpngate.net OpenVPN servers.
- Filter VPN servers by geographical location (country, Europe, or USA)
- Probe VPN endpoints to skip unresponsive servers before connecting
- Perform a speed test after connecting, so you can decide to keep or try the next server
- If a server runs stable for 5 minutes, save it in a qualified list for priority use
- Support for both Linux and Windows (with color output)
- Automatically sorts servers by latency (can be disabled)
- Supports connecting with your own
.ovpnconfig file
On Linux, you may need
sudoto install system-wide or use a virtual environment.
Note
You must run as Administrator (Windows) or with sudo (Linux) to allow OpenVPN to work properly.
For all options, run:
python3 ./VpngateClient/VpngateClient.py --helpgit clone https://github.com/sinspired/VpngateClient.git
cd VpngateClient
sudo pip install -e .
sudo python3 ./VpngateClient/VpngateClient.pyOpen PowerShell or CMD as Administrator, then:
git clone https://github.com/sinspired/VpngateClient.git
cd VpngateClient
pip install -e .
py VpngateClient\VpngateClient.pyNote
If you see color output issues, run pip install colorama or pip install -r requirements.txt.
If you are using a system-managed Python environment (e.g., on Ubuntu), you may encounter restrictions when installing packages system-wide. To install in development mode, use:
sudo pip install -e . --break-system-packagesWarning
Using --break-system-packages may affect your system's Python environment.
For a safer approach, consider using a virtual environment.
Try VPN servers one-by-one, default sorted by latency (lowest first):
sudo python3 ./VpngateClient/VpngateClient.pyTo disable latency sorting (use original order):
sudo python3 ./VpngateClient/VpngateClient.py # --no-sort-latency to cancel sort by latencyOnly consider VPN servers in a specific country (e.g., Canada):
sudo python3 ./VpngateClient/VpngateClient.py --country CA # -c CA
sudo python3 ./VpngateClient/VpngateClient.py --us # --us is a shorthand for --country USThe country identifier is a 2-letter code (ISO 3166-1 alpha-2).
Only consider VPN servers in Europe:
sudo python3 ./VpngateClient/VpngateClient.py --euYou can connect directly using your own OpenVPN config file:
sudo python3 ./VpngateClient/VpngateClient.py /path/to/your.ovpnSee all command line options:
python3 ./VpngateClient/VpngateClient.py --help-
Q: 提示找不到 openvpn 命令?
A: 请先安装 OpenVPN,并确保其在系统 PATH 路径下。Linux 可用sudo apt install openvpn,Windows 请从官网下载安装。 -
Q: 权限不足或无法连接?
A: 请用sudo(Linux)或以管理员身份运行(Windows)。 -
Q: 依赖 colorama 报错?
A: Windows 下请运行pip install colorama或pip install -r requirements.txt。 -
Q: 如何收藏优质节点?
A: 连接稳定超过 5 分钟的节点会自动保存,下次优先尝试。 -
Q: 如何只测速不连接?
A: 目前不支持单独测速,连接后会自动测速。
- 本工具自动下载并筛选 vpngate 免费节点,优先连接响应快、速度高的服务器。
- 支持国家/地区过滤、测速、自动收藏优质节点。
- 支持自定义 .ovpn 文件一键连接。
- 需确保 Python3、OpenVPN 已安装,运行时需管理员权限。