README
¶
vpnet-cli
Command-line client for the VP.NET WireGuard VPN service.
Features
- Multiple authentication methods -- OAuth2, email/password, email token, or anonymous accounts
- Anonymous crypto payments -- Subscribe with BTC, LTC, USDT, and more
- Userspace WireGuard -- No root access or kernel module required
- Ping through VPN -- Test connectivity and latency via the encrypted tunnel
- In-tunnel DNS resolution -- Resolve hostnames through the VPN tunnel
- HTTP through the tunnel --
wgetandcurlcommands with no system-wide VPN needed - External WireGuard support -- Register your own public key and get a WireGuard config
- Server list with signature verification -- RSA-signed server lists ensure authenticity
Install
go install github.com/vpdotnet/vpnet-cli@latest
Or build from source:
git clone https://github.com/vpdotnet/vpnet-cli.git
cd vpnet-cli
go build
Usage
Authentication
# OAuth2 login (opens browser)
vpnet-cli login
# Email/password login
vpnet-cli login -u user@example.com
# Email token login (sends a code to your email)
vpnet-cli login -u user@example.com --token
# Create anonymous account (for crypto payments)
vpnet-cli login --anonymous
Account & Subscription
# View account info
vpnet-cli account
# Set email on anonymous account
vpnet-cli set-email user@example.com
# Order a subscription with crypto (1m, 1y, or 3y)
vpnet-cli order 1y
vpnet-cli order 1m BTC
vpnet-cli order 3y USDT@polygon
VPN Connection
# Connect to VPN
vpnet-cli connect
# Disconnect
vpnet-cli disconnect
# Check connection status
vpnet-cli status
Ping
Test connectivity through the VPN tunnel without needing root access:
# Ping an IP (4 pings, auto-select region)
vpnet-cli ping 8.8.8.8
# Ping a hostname (resolved via in-tunnel DNS)
vpnet-cli ping google.com
# Ping via a specific region
vpnet-cli ping -region 'New York' 8.8.8.8
# Use beta servers
vpnet-cli ping -beta -region 'Los Angeles, California' 8.8.8.8
# Continuous ping
vpnet-cli ping -c 0 8.8.8.8
Set Key
Register your own WireGuard public key with a server and get a config file:
# Register a key and output WireGuard config
vpnet-cli set-key <base64-pubkey> 'Amsterdam, Netherlands'
# With beta servers
vpnet-cli set-key -beta <base64-pubkey> 'Los Angeles, California'
HTTP Requests
Both commands bring up a temporary tunnel with an ephemeral key, so they work without connecting the whole system to the VPN.
# Download a file through the tunnel
vpnet-cli wget https://example.com/file.bin
# Write to stdout, via a specific region
vpnet-cli wget -region 'Amsterdam, Netherlands' -o - https://example.com/
curl accepts curl(1)-style options, before or after the URL:
# GET, printing the body
vpnet-cli curl https://example.com/
# POST form data with a custom header
vpnet-cli curl -X POST https://api.example.com/v1/things \
-H 'Authorization: Bearer TOKEN' -d 'name=test' -d 'count=2'
# POST JSON (sets Content-Type and Accept)
vpnet-cli curl --json -d '{"name":"test"}' https://api.example.com/v1/things
# Read the body from a file or stdin
vpnet-cli curl -X PUT --data-binary @payload.json https://api.example.com/v1/thing
echo '{}' | vpnet-cli curl -d @- https://api.example.com/v1/thing
# Multipart upload
vpnet-cli curl -F 'name=bob' -F 'photo=@avatar.png' https://api.example.com/upload
# Show response headers, follow redirects, save to a file
vpnet-cli curl -iL -o page.html https://example.com/
# Inspect the exchange
vpnet-cli curl -v https://example.com/
Run vpnet-cli curl with no arguments for the full option list. Supported:
-X/--request, -H/--header, -d/--data, --data-raw, --data-binary,
--data-urlencode, --json, -F/--form, -T/--upload-file, -G/--get,
-u/--user, -A/--user-agent, -e/--referer, -b/--cookie, -o/--output,
-O/--remote-name, -i/--include, -I/--head, -L/--location,
--max-redirs, -k/--insecure, -f/--fail, -s/--silent, -v/--verbose,
-m/--max-time, --connect-timeout, plus --region and --beta.
Server List
# List available servers
vpnet-cli servers
# Include beta servers
vpnet-cli servers --beta
Configuration
Configuration is stored in $XDG_CONFIG_HOME/vpnet-cli/ (typically ~/.config/vpnet-cli/):
config.json-- Preferencesauth.json-- Authentication tokens
License
MIT -- Copyright (c) 2025 VP.NET LLC
Documentation
¶
There is no documentation for this package.