A lightweight macOS menu bar app for one-click FortiVPN connect/disconnect. Wraps the openfortivpn CLI with a native Swift + AppKit interface.
- Download
AutoForti.dmgfrom Releases - Open the DMG and drag AutoForti.app to Applications
- Remove quarantine attribute before first launch (app is not signed with Apple Developer ID):
sudo xattr -cr /Applications/AutoForti.app
- Launch the app
The DMG bundles openfortivpn and OpenSSL — no additional installation required.
# Requires: macOS 14+, Swift 6.0+, openfortivpn (brew install openfortivpn)
make dmg
open .build/AutoForti.dmg- macOS 14+
- Swift 6.0+
openfortivpn(brew install openfortivpn)
- Launch the app — enter your admin password on first run (sudoers setup)
- Enter your server, username, and password in the settings window
- Connect/disconnect from the menu bar icon
- One-click connect/disconnect from the menu bar
- Credentials stored securely in macOS Keychain
- Password passed via temporary config file (never exposed in process list)
- Auto-detection and trust dialog for server certificates
- Automatic detection of existing openfortivpn processes
- Process cleanup on app exit
- openfortivpn + OpenSSL bundled in the app (no Homebrew needed)
Sources/AutoForti/
├── main.swift # NSApplication entry point
├── AppDelegate.swift # Initialization, sudoers check
├── StatusBarController.swift # Menu bar management
├── VPNManager.swift # openfortivpn process management
├── KeychainManager.swift # Keychain CRUD (single JSON entry)
├── ConfigManager.swift # UserDefaults settings
├── SetupWindowController.swift # Settings window
├── WelcomeWindowController.swift # First-launch welcome screen
└── SudoersManager.swift # Automatic sudoers setup
| Target | Description |
|---|---|
make build |
Debug build |
make release |
Release build |
make run |
Build & run |
make dmg |
Create DMG (with bundled openfortivpn) |
make app-bundle |
Create .app bundle |
make icon |
Generate app icon |
make setup |
Manual sudoers setup (usually not needed) |
make clean |
Remove build artifacts |
This project is licensed under the GNU General Public License v3.0.
| Software | License | Source Code |
|---|---|---|
| openfortivpn | GPL-3.0 | https://github.com/adrienverge/openfortivpn |
| OpenSSL | Apache-2.0 | https://github.com/openssl/openssl |