Fast, concurrent OpenVPN configuration validator that automatically finds working .ovpn files from your specified directory.
What it does: Instead of manually testing each OpenVPN config file with
sudo openvpn --config, Vmate automates the entire process, saving you hours of tedious work.
This is a complete rewrite of my original Java version in Go, leveraging goroutines for massive concurrency improvements:
| Version | Processing Time (250 configs) | Speed Improvement |
|---|---|---|
| Java | ~40 minutes | Baseline |
| Go | ~10 seconds | 240x faster |
The more system resources you have (especially RAM), the better the performance scales.
- 🔍 Automatic Discovery: Scans specified directories recursively for .ovpn files
- ⚡ Concurrent Testing: Uses goroutines to test multiple configs simultaneously
- ⏱️ Configurable Timeout: Set custom timeouts for each connection test
- 🎯 Result Limiting: Control how many working configs to find
- 🔧 Verbose Mode: Get detailed output for debugging
- 📊 Worker Pool Management: Control concurrency levels to match your system
- 🔄 Smart Connect: Connect to a specific config with auto-reconnection and failover
- 📜 Recent History: View and reuse previously successful configs
- ✏️ Config Modifier: Automatically fix outdated cipher settings in .ovpn files
- 📈 Progress Visualization: Real-time progress bar showing test status
- Go 1.19+ (for building from source)
- OpenVPN installed on your system
- Root/sudo access (required for OpenVPN testing - Vmate will prompt automatically)
git clone https://github.com/codewiththiha/vmate-cli.git
cd vmate-cli
go build -o vmate-cli main.go
sudo mv vmate-cli /usr/local/bin/go install github.com/codewiththiha/vmate-cli@latestNote: Ensure your GOPATH/bin (usually ~/go/bin) is in your system's PATH:
export PATH=$PATH:$(go env GOPATH)/binIf you encounter version conflicts or caching issues:
1. Bypass the Go Module Proxy:
GOPROXY=direct go install github.com/codewiththiha/vmate-cli@latest2. Install a Specific Commit:
# Get the latest commit hash
git ls-remote https://github.com/codewiththiha/vmate-cli.git HEAD
# Then install using that commit
go install github.com/codewiththiha/vmate-cli@<commit-hash>3. Install from Local Clone:
git clone https://github.com/codewiththiha/vmate-cli.git
cd vmate-cli
go install .
sudo mv $(go env GOPATH)/bin/vmate-cli /usr/local/bin/Why these issues happen: The Go module proxy caches versions for performance, and it can take 30-60 minutes to recognize new commits.
sudo manually. The tool automatically requests root privileges when needed.
# Basic usage - scan default home directory
vmate-cli
# Scan specific directory with custom settings
vmate-cli --dir=/path/to/ovpn/files --limit=50 --timeout=10 --max=20
# Get detailed output
vmate-cli --verbose --dir=~/vpn-configs
# View previously successful configs
vmate-cli --recent
# Connect to a specific config with smart failover
vmate-cli --connect=/path/to/config.ovpn
# Fix outdated cipher settings in all configs
vmate-cli --dir=/path/to/ovpn/files --modifyFlags:
-d, --dir string Directory containing .ovpn files (default "~/")
-h, --help Help for vmate
-l, --limit int Maximum number of working configs to find (default 100)
-m, --max int Maximum concurrent worker processes (default 200)
-t, --timeout int Timeout in seconds for each connection test (default 15)
--verbose Enable detailed output for debugging
-r, --recent Display recently successful configs from history
--modify Fix outdated cipher settings in .ovpn files
-c, --connect string Connect to a specific config with smart reconnection--recentmust be used alone (incompatible with other operational flags)--connectcan be combined with--verbosebut not other flags- The tool automatically re-executes with sudo if not run as root
Vmate automatically respects your system's OpenVPN capabilities. Configuration history is stored in recent.txt in the current directory.
⚠️ DO NOT run withsudomanually - Vmate automatically requests root privileges when needed- Adjust
--maxbased on your system's RAM (higher = faster but more memory usage) - Use
--timeoutto balance speed vs. thoroughness (lower = faster, but might miss slow servers) - Set
--limitto 0 for unlimited results - Recent history is saved after each successful scan and persists across sessions
The --modify flag automatically updates outdated cipher configurations:
- Replaces
cipher AES-128-CBCwith moderndata-ciphers AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305:AES-128-CBC - Marks modified files with
#MODIFIEDheader to prevent duplicate changes - Only processes files that haven't been modified already
- Core CLI functionality
- Concurrent processing with worker pools
- Smart connection management with auto-reconnection
- Recent history tracking
- Config modifier for outdated ciphers
- GUI version - Currently in development using Wails
This project is in beta (v0.0.2a). Basic functions are stable and usable. Contributions are welcome! Please ensure all CLI flags are documented when adding new features.
Found a working config that Vmate missed? Open an issue with the details. Performance not meeting expectations? Let me know your setup!
- The Go team for making concurrency approachable
- Cobra for the excellent CLI framework
- OpenVPN community for maintaining the protocol