2 unstable releases
new 0.2.0 | Feb 22, 2025 |
---|---|
0.1.0 | Feb 18, 2025 |
#2648 in Command line utilities
45 downloads per month
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
~417K SLoC