dustinrue / ControlPlane

ControlPlane - context-sensitive computing for OS X
http://www.controlplaneapp.com
BSD 3-Clause "New" or "Revised" License
1.76k stars 180 forks source link

Request: Public IP Evidence Source #204

Open BrianGilbert opened 11 years ago

BrianGilbert commented 11 years ago

I'd love to see an evidence source based on my public IP address, or if there is a sane way to do this using applescript?

djbe commented 11 years ago

You can get your IP with the following shell command: curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'

Should be easy to create a script that compares this value to whatever you want.

BrianGilbert commented 11 years ago

Any ideas on how to only trigger it when internal IP changes..? seems overkill to have to run it every [n] seconds..

I'm not sure it's been raised but the concept of chained events would be a great addition

djbe commented 11 years ago

Hmm, not without programming an actual evidence source, only then can you register for network interface events.

I'm not sure I understand your concept of chained events correctly, but maybe you should create a specific issue for it and explain it there.

linickx commented 11 years ago

:+1: for this idea.

I had a script which used http://icanhazip.com to check my external IP against a known local list (script array); but this approach became cumbersome to maintain with proxy server authentication (at work, and various customer sites), something inside controlplane with OS integration into locations/keychains/etc would be a nice-to-have :smile:

BrianGilbert commented 11 years ago

supposedly coming in a future release https://github.com/dustinrue/ControlPlane/issues/205#issuecomment-21304809