Method for setting VPN disconnection, redialing, and boot up on Mac OS X
Summary:Previously, this website introduced the method of setting up VPN startup for Windows system. As more and more friends are using Apple computers now, t…
This book is available as an e-book in EPUB format
PayPal sponsors this website for any amount. I will send you an EPUB e-book via email. Please send me an email
Email: shuxueha@outlook.com
PayPal: https://paypal.me/zhipinglei
You can also scan the PayPal QR code below to sponsor
You can also purchase this book on Amazon: click to enter the Amazon official website
Previously, this website introduced the method of setting up VPN startup for Windows system. As more and more friends are using Apple computers now, the editor has decided to supplement it for Mac system. This method can also be used to solve problems such as VPN disconnection caused by Mac machine hibernation during daily use.
1. Firstly, establish a VPN connection, which can be PPTP/L2TP/IPsec. The setup method can refer to the tutorial on this website.
2. Open Finder - Programs - Utilities - AppleScript Editor in sequence, create an AppleScript script with the following content, where "MYVPN" is the name of the VPN you created. Please modify it according to your own needs.
on idle
tell application "System Events"
tell current location of network preferences
set myConnection to the service "MYVPN"
if myConnection is not null then
if current configuration of myConnection is not connected then
connect myConnection
end if
end if
end tell
return 120
end tell
end idle
3. Store the AppleScript script as an APP application, with any name or Chinese. Check the box for 'Keep open after running the processing program', as shown in the following figure.
4. If you want to customize the Dock icon of this program, you can drag and drop an inc icon file to replace the default apple. icns in the AppleScript editor, as shown below.
5. Once the settings are complete, run your software. When the VPN disconnects, it will automatically redial until the program for automatic reconnection is exited. That is to say, if you really want to disconnect the VPN, please exit this software first, otherwise it will automatically cycle and redial
6. If you need to set this software to run automatically upon startup, right-click on the Dock icon and select "Open upon login" in the options. In addition, you can also add a self launching program in "System Preferences - Users and Groups - Login Options".
| High-speed VPN | Fast VPN | Preferred Accelerator VPN | Reliable VPN |
| High quality VPN | Old fashioned VPN | Stable VPN(Recommend) | Smooth VPN |

