Timac / VPNStatus

VPNStatus, a replacement for macOS builtin VPN Status
https://blog.timac.org/2018/0719-vpnstatus/
MIT License
224 stars 32 forks source link

Run script on connect/disconnect #29

Open r4tz52 opened 1 year ago

r4tz52 commented 1 year ago

Hi! I'm looking for ability of updating routes when my VPN connects or disconnects. Unfortunately, the /etc/ppp/ip-up and networksetup -setadditionalroutes are not working for IKEv2 VPN, only L2TP ones. Is there a way to run some script with VPNStatus? Thanks!

Timac commented 12 months ago

@r4tz52 In theory, VPNStatus could run some scripts. However, manipulating the routing tables will require the scripts to run as root. This means that a privileged helper should be created. Is there already such a tool available that VPNStatus could trigger?

r4tz52 commented 12 months ago

@Timac I'm afraid I didn't found any tool for working with routing tables yet. BTW I believe that ability of running any script (even with low privileges) would be useful.