geofeed-0.1.0 is not a library.
Overview
geofeed is a simple Rust application to pull geofeeds (RFC8805) and check if an IP is matched within the networks advertised.
Example
To run the program give a geofeed URL and a list of one or more IPs to check if are contained in the geofeed separated by spaces.
# geofeed --geofeed-url https://geoip.starlinkisp.net/feed.csv --ip 14.1.64.1 8.8.8.8 138.84.56.42 | jq
Output
⚠️ Warning information here might be dated, this is just for the output example.
{
"ip": "14.1.64.1",
"record": {
"ip": "14.1.64.0/24",
"alpha2": {
"name": "Philippines",
"alpha2": "PH",
"alpha3": "PHL",
"numeric": 608
},
"region": {
"name": "National Capital Region",
"subdivision_type": "Region",
"code": "PH-00",
"country_name": "Philippines",
"country_code": "PH"
},
"city": "Manila",
"postal_code": null
}
}
{
"ip": "138.84.56.42",
"record": {
"ip": "138.84.56.0/24",
"alpha2": {
"name": "Brazil",
"alpha2": "BR",
"alpha3": "BRA",
"numeric": 76
},
"region": {
"name": "São Paulo",
"subdivision_type": "State",
"code": "BR-SP",
"country_name": "Brazil",
"country_code": "BR"
},
"city": "Sao Paulo",
"postal_code": null
}
}
{
"ip": "8.8.8.8",
"record": null
}