VPN Sync 中文 GitHub

9 online on 3 servers, 1 paused

Your VPN servers, out of the terminal and into view.

OpenVPN, WireGuard and VLESS + Reality, from your Mac and iPhone: who's connected, what each device uses, and which VPN a network blocks.

Source on GitHub Try it in your browser

Free and open source (MIT). macOS 14+, iOS 17+. Version 1.3.0, what's new.

VPN Sync on a Mac showing a server's devices with their country, speed and usage, and the iPhone app showing the same server: a warning that this network may be blocking WireGuard, pending updates, and its ports

The script installs it. After that, it's SSH.

Built for Nyr's installers. Same three peers, two views:

$ sudo wg show
interface: wg0
  public key: Hn3q9mVZ0rL8cS2kP5yTfW1aJ7uXbN4eD6gQoRzC0Ik=
  private key: (hidden)
  listening port: 51820
 
peer: v8KpQ2nR7tY1wE5uI3oA9sD4fG6hJ0kLzXcVbNmQ1Sg=
  endpoint: 203.0.113.216:56909
  allowed ips: 10.7.0.4/32, fddd:2c4:2c4:2c4::4/128
  latest handshake: 12 seconds ago
  transfer: 61.84 MiB received, 6.24 GiB sent
 
peer: Ze4LmN8bV1cX6zA2sD9fG3hJ5kQ7wE0rT4yU8iO2pPw=
  endpoint: 192.0.2.112:49152
  allowed ips: 10.7.0.5/32, fddd:2c4:2c4:2c4::5/128
  latest handshake: 48 seconds ago
  transfer: 1.02 GiB received, 6.66 GiB sent
 
peer: Qa7SdF2gH9jK4lZ1xC6vB3nM8qW5eR0tY2uI7oP4aLc=
  endpoint: 198.51.100.161:64666
  allowed ips: 10.7.0.3/32, fddd:2c4:2c4:2c4::3/128
  latest handshake: 1 minute, 31 seconds ago
  transfer: 9.47 MiB received, 650.12 MiB sent
Which key is the TV?
  • living-room-tvOn WireGuard from 🇬🇧 203.0.113.216:569096.7 GB today↓ 2.6 MB/s
  • macbook-proOn WireGuard from 🇸🇪 192.0.2.112:491527.15 GB today↓ 2.2 MB/s
  • guestOn WireGuard from 🇺🇸 198.51.100.161:64666720 MB today, 72% of 1 GB a day↓ 66 KB/s
Point at one to find it on the left.
Script alone VPN Sync
Who's connectedwg show, one serverLive, by name, with country and speed
Data per deviceNot countedToday and this month
Too much dataRevoke itA limit that alerts or pauses
New deviceSSH, script, copy a fileOne name, every VPN, a QR code
Server gets a new IPEvery profile breaksServer and Mac fix theirs; rescan on phones and TVs
Another portEdit it all by handOne sheet
A network blocks a VPNGuess whichSays which is probably blocked, and what works
Lost phoneRevoke, make a new oneNew keys, settings kept
Second serverSecond terminalSame window

Try it here

A toy copy of the Mac app. Pause a device or all of Alex's, set a limit, add one.

What it does

Usage and limits count OpenVPN, WireGuard, Reality and AmneziaWG, not Hysteria2, Shadowsocks or TUIC; a pause covers those too. AmneziaWG needs Ubuntu 22.04 or newer. Hysteria2 and TUIC can't be checked for blocking. Removing an add-on takes out what it installed and restores the settings it changed. Lightsail charges for snapshots, and going back to one is done by hand in its console. Every detail is in the guide.

When a server comes back on a new IP

Without a static IP, a Lightsail server gets a new address when you stop and start it. Then:

Lightsail, Tokyo Running 198.51.100.24203.0.113.77 vpn-endpoint-sync rewrote 9 profiles
  • alex-iphone.conf198.51.100.24203.0.113.77
  • macbook-pro.conf198.51.100.24203.0.113.77
  • pixel-8.ovpn198.51.100.24203.0.113.77
Your Mac Its copies still point at the old address.
  • Found 203.0.113.77 through Lightsail
  • Pulled 9 fresh profiles to the Desktop
  • Updated OpenVPN Connect
  • Phones and TVs: scan the new QR code

At work

Devices tab: online devices with country flags, speeds and data used above the offline ones, a guest with a daily limit, and a work laptop that is paused
How each device connects, how fast, and its limit.

Demo mode: the servers, devices and addresses are made up.

The same servers, on your phone

Talks to your servers itself, so the Mac can stay off.

  • Pause, limit, add and remove devices
  • Show a QR code, or share a profile
  • Ports, data allowance, server health, speed test
  • Checks for blocked VPNs when you open a server
  • Check Profiles after an IP change
  • Shortcuts and Siri: who's online, pause a device
  • A second way in when a network cuts SSH
  • Stop and start a Lightsail server

Set up with one encrypted file from the Mac; include the Lightsail key in it for the Lightsail features. Face ID locks it.

The iPhone app: the server list, Tokyo with its upkeep and ports, people, a device's page, and what works on each network A server on the iPhone: a note that WireGuard goes silent on this network and OpenVPN and Reality work, pending updates with a newer Xray, and its ports

How it fits together

The Mac and iPhone apps connect over SSH with a pinned host key to small tools on each server, which sit beside the OpenVPN, WireGuard, Reality and add-on installs. Mac appand vpn-sync command iPhone appits own SSH client SSH, pinned host key Each server vpn-status vpn-usage vpn-add-client vpn-remove-client vpn-endpoint-sync vpn-service vpn-addon a firewall chain for pauses OpenVPN WireGuard Reality, add-ons The Mac and iPhone apps connect over SSH with a pinned host key to small tools on each server, which sit beside the OpenVPN, WireGuard, Reality and add-on installs. Mac appand vpn-sync iPhone appits own SSH client SSH, pinned host key Each server vpn-status vpn-usage vpn-add-client vpn-remove-client vpn-endpoint-sync vpn-service vpn-addon a firewall chain for pauses OpenVPN WireGuard Reality, add-ons

Pick a tool on the server to see what it does.

The installs stay as the scripts left them. VPN Sync adds small tools beside them.

Install

On your Mac

Needs Xcode 26 or later, or its Command Line Tools, to build.

git clone https://github.com/HenryCooper86/vpn-sync.git
cd vpn-sync
./install-mac.sh

Open VPN Sync, Add Server…, then Set Up…. It keeps your install, or makes a fresh one.

On your iPhone

Open ios/VPNSyncPhone.xcodeproj in Xcode, put your team in ios/Local.xcconfig and run it on your phone. Then on the Mac: Settings → iPhone → Export for iPhone…

Free Apple IDs need a reinstall every 7 days.

Try it without a server

demo/run-mac-demo.sh

Made-up servers. Your real ones aren't touched.

Your servers, your keys

Run your own VPN, and see it.

Source on GitHub Read the guide