I'm using version 3.3.5. I'd like to be able to determine--programmatically, from command line--whether or not my client is connected to the OpenVPN server. It doesn't need to be 100% accurate; i.e. it's ok if it says things are connected a split second before they actually are.
Some things I've tried:
- I know there would be differences in ifconfig, but w/o the diff seems hard to generally make that determination (e.g., it won't "always" be utun2)
- Maybe I could ping a host that is only reachable via the VPN, but let's assume ICMP has been disabled on any such host
- The log file button in top right corner of the app provides rich logs, but I don't know where they exist on my machine (maybe they only live on the server?)
- The only log file I've found of any possible use is at /private/var/log/ovpnagent.log, but it's esoteric and would be a big stretch to use it for this purpose
Any help would be greatly appreciated, thanks!