Multi-tunnel VPN manager for WireGuard and OpenVPN. Import configs, start/stop tunnels by name, enable kill switch, run DNS leak tests, and measure speed -- all from a single binary.
Download the latest release for your platform from the releases page.
go install github.com/jmsperu/vpnctl@latestgit clone https://github.com/jmsperu/vpnctl.git
cd vpnctl
make build# Import VPN configs
vpnctl import office /etc/wireguard/office.conf
vpnctl import travel ~/vpn/travel.ovpn
# Connect and disconnect
vpnctl up office --kill-switch
vpnctl down office
# Check status and diagnostics
vpnctl status
vpnctl test
vpnctl speedImport a WireGuard (.conf) or OpenVPN (.ovpn) config file. The type is detected automatically from the file extension.
vpnctl import <name> <path>
vpnctl import office /etc/wireguard/wg0.conf
vpnctl import travel ~/vpn/provider.ovpnConnect a tunnel by name.
vpnctl up <name>
vpnctl up office
vpnctl up office --kill-switch| Flag | Description |
|---|---|
--kill-switch |
Block all traffic if the VPN connection drops |
Disconnect a tunnel by name. Automatically disables the kill switch if it was active.
vpnctl down <name>
vpnctl down officeShow the connection state of all configured tunnels.
vpnctl statusList all saved tunnels with type, auto-connect setting, and config path.
vpnctl listRemove a saved tunnel by name.
vpnctl remove <name>
vpnctl remove officeRun connection diagnostics: display public IP and perform a DNS leak test.
vpnctl testRun a download speed test (10 MB via Cloudflare) on the current connection.
vpnctl speedTunnel metadata is stored in ~/.vpnctl.yml. Imported config files are copied to ~/.vpnctl.d/.
tunnels:
- name: office
type: wireguard
config_path: ~/.vpnctl.d/office.conf
auto_connect: false
kill_switch: true
- name: travel
type: openvpn
config_path: ~/.vpnctl.d/travel.ovpn
auto_connect: false
kill_switch: false| Field | Description |
|---|---|
name |
Tunnel display name |
type |
wireguard or openvpn |
config_path |
Path to the imported config file |
auto_connect |
Connect automatically (reserved for future use) |
kill_switch |
Enable kill switch by default for this tunnel |
MIT