1 unstable release
new 0.1.0 | Feb 18, 2025 |
---|
#2628 in Command line utilities
14KB
60 lines
Where Am I From
Why
An elementary tool to detect Linux active interfaces change and get your a country your public IP belongs to. I need this as I often use some VPN tunnel and want to see my current "location" at i3 status bar.
How it works
The code:
- Checks number of active network connections.
- If number changed app does HTTP request to external API returning geo location of IP address from where request comes.
- Updates location country at
/tmp/whereamifrom
file.
Currently https://ipinfo.io/ is used.
Dependencies
~9–26MB
~418K SLoC