mpolden / echoip

IP address lookup service
https://ifconfig.co
BSD 3-Clause "New" or "Revised" License
4.01k stars 526 forks source link

Qatar is in the EU #182

Open rassie opened 7 months ago

rassie commented 7 months ago

Currently, echoip with a current GeoLite2-Country database considers Qatar to be a member of the EU.

Example IP: 45.83.136.12

Current JSON response from a local instance with fully updated GeoLite2-Country:

{
    "ip": "45.83.136.12",
    "ip_decimal": 760449036,
    "country": "Qatar",
    "country_iso": "QA",
    "country_eu": true,
}

Qatar is not in the EU according to current GeoLite2-Country-CSV database. Verification with the GeoLite2-Country MMDB and Python code

import geoip2.database

with geoip2.database.Reader('/tmp/geoip/GeoLite2-Country.mmdb') as reader:
    response = reader.country('45.83.136.12');
    print(response.country.is_in_european_union)
$ python geoip.py
False

At this point I have to assume an error in echoip code.