A minimal macOS menu bar app for managing Hysteria 2 VPN connections.
- Sits in the menu bar — no Dock icon, no windows
- Automatically discovers all
.yaml/.ymlconfigs in~/.config/hysteria/ - Switch between servers in one click
- Sets macOS system SOCKS5 proxy automatically on connect / disconnect
- macOS 12 or later
- Hysteria 2 installed via Homebrew:
brew install hysteriaCreate your config files in ~/.config/hysteria/. Each file becomes one menu entry — the filename (without config and .yaml) is used as the display name.
Example structure:
~/.config/hysteria/
├── configSweden.yaml
└── configNetherlands.yaml
This produces two entries in the menu: Sweden and Netherlands.
Minimal config example (configSweden.yaml):
server: <YOUR_SERVER>:<PORT>
auth: <YOUR_USERNAME>:<YOUR_PASSWORD>
tls:
insecure: false
socks5:
listen: 127.0.0.1:1080
http:
listen: 127.0.0.1:8080Replace <YOUR_SERVER>, <PORT>, <YOUR_USERNAME>, and <YOUR_PASSWORD> with your actual server details.
For the full list of available config options, see the Hysteria 2 client configuration docs.
Go to the Releases page and download the latest hyToggle.app.zip. Unzip and drag to /Applications.
# 1. Build release binary
swift build -c release
# 2. Package into .app bundle
./build_app.sh
# 3. Copy to Applications
cp -r ~/projects/vpnBar/vpnBar.app /Applications/Run locally without installing:
./.build/release/vpnBarWhen you connect, hyToggle:
- Launches
hysteria client --config <selected.yaml>as a background process - Sets your Wi-Fi SOCKS5 proxy to
127.0.0.1:1080vianetworksetup
When you disconnect, it terminates the process and clears the proxy.
Under the hood, hyToggle manages a hysteria client instance like this:
/opt/homebrew/bin/hysteria client \
--config ~/.config/hysteria/configSweden.yaml \
-l ERROR- Only Wi-Fi proxy is managed automatically. If you use Ethernet, you may need to set the proxy manually.
- The app expects hysteria to be at
/opt/homebrew/bin/hysteria(default Homebrew path on Apple Silicon).
I noticed that most macOS clients for Hysteria are either over-engineered or tend to break with every new update. I wanted something stable and lightweight, so I built hyToggle. It's a simple tool to manage the Hysteria binary natively without the bloat.
MIT
