| Crates.io | whereamifrom |
| lib.rs | whereamifrom |
| version | 0.5.0 |
| created_at | 2025-02-18 18:14:55.320045+00 |
| updated_at | 2025-03-03 18:37:34.926499+00 |
| description | A tool to detect country of your public IP |
| homepage | https://github.com/nixargh/whereamifrom |
| repository | https://github.com/nixargh/whereamifrom |
| max_upload_size | |
| id | 1560247 |
| size | 56,199 |
An elementary tool to detect Linux active interfaces change and get a country yours 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.
The code:
/tmp/whereamifrom file.Currently https://ipinfo.io/ is used.
Using command line arguments or environment variable you may change application behavior. For example to get more information and use it any way you like:
$ FILE=/tmp/test URL=http://ipinfo.io/ ./target/debug/whereamifrom
Creates:
{
"ip": "77.88.99.100",
"city": "Orgrimmar",
"region": "Durotar",
"country": "Kalimdor",
"loc": "45.00,65.00",
"org": "The Horde",
"postal": "0000",
"timezone": "Azeroth",
"readme": "https://ipinfo.io/missingauth"
}