The VPN Handler
is an application for handling the built-in VPN in the macOS:
- auto connect.
- auto reconnect.
- multi-user macOS environment & VPN management.
The specific user - is the user for which you want to use a specific VPN. For example, a workVPN must be enabled for a workUser, while for other users the workVPN must be disabled.
- Download the latest release.
- Launch the application.
- Connect to the VPN.
- (Optional) enable automatic VPN connection when the application launches.
- (Optional) enable launch of the application on the macOS startup.
Notifications may depend on your "Notifications & Focus"1 Preferences.
- User can select the VPN and connect or disconnect to the VPN.
- User can select the VPN and enable or disable automatic VPN connection when the application launches.
- User can enable or disable launch of the application on the macOS startup.
- User can use multi-user macOS environment.
-
Tracks VPN connections:
- reconnect if the VPN connection is down.
- if the Internet connection is down, then wait until the Internet connection is established, then try to reconnect to the VPN.
- reconnection must be followed by the number of attempts, and each attempt must be delayed with increasing time.
-
Supports multi-user macOS environment:
- keep active VPN connections for the selected user.
- disconnect from all selected VPNs when switching to another users.
- reconnect to all selected VPNs when switching to the selected user.
-
Supports preferences:
- automatically connect to the preferred VPNs when the application launches.
- automatically launch or not launch the application on the macOS startup.
- preferences must be stored permanently.
-
Tracks macOS Network Preferences:
- created VPN must be automatically added to the application.
- renamed VPN must be automatically detected in the application.
- deleted VPN must be automatically deleted from the application.
-
Pushes macOS notifications:
- connect to the VPN:
- Connecting πΎ π
- Connected π π’
- Connection failed π π΄
- reconnect to the VPN:
- Reconnecting πΎ π²
- disconnect from the VPN:
- Disconnecting πΎ π£
- Disconnected π£ π’
- Disconnection failed π£ π΄
- internet connection is down:
- Interrupted πΎ π₯
- VPN has been created or renamed:
- Detected new VPN πΎ π
- VPN has been deleted or renamed:
- Removing VPN πΎ β
- connect to the VPN:
- Clone the repository:
git clone https://github.com/tsarenkotxt/vpn-handler.git
- Open the project:
cd vpn-handler
- Build and launch the application:
sh build_and_launch.sh
rumps and py2app must be pre-installed.
The application is not signed2 and the following warning may appear on the first launch:
βVPN Handler.appβ canβt be opened because Apple cannot check it for malicious software.
Workaround:
- Open preferences - navigate to:
"System Preferences" > "Security & Privacy" > "General"
- Grant access - click to:
"Open Anyway"
- Getting VPN to auto-reconnect on connection drop
- How to auto connect to VPN upon login/boot?
- Secure traffic before connecting to WI-FI/VPN?
- VPN with two Mac users
- How to automatically connect VPN when connecting to a network?
- How do I automatically connect to a VPN when using Wi-Fi in OS X?
Have a look through existing Issues
and Pull Requests that you could help with.
If you'd like to request a feature or report a bug,
please create a GitHub Issue using one of the templates provided.