6ff8d018525b73c8836fa687bf16f45ccc1a11f1 galt Wed Jun 21 23:33:34 2023 -0700 Adding a utility for using our existing geoIp infrastructure to lookup a 2-letter country code from an IP address (IPv4 or IPv6). Gives an error if the IP address is malformed, gives an error if hgcentral.geoIpCountry6 table does not exist, then uses it to lookup the country. If it is not found in our Maxmind table, then it returns "not found". Hopefully Hiram and others can use this. diff --git src/hg/geoIpToCountry/README src/hg/geoIpToCountry/README new file mode 100644 index 0000000..89b6876 --- /dev/null +++ src/hg/geoIpToCountry/README @@ -0,0 +1,12 @@ +Creating a utility to lookup country via IP address using our existing geoIp infrastructure, +including the geoIp.geoIpCountry6 table which has been pushed to hgcentraltest. +This should not be required to push geoIpCountry6 table to the RR unless people want to run this utility there. + +Hiram is interested in processing log files and looking up country via IP. +In particular, China blocks google entirely which is a problem. + +See the process that builds the geoIp tables and data is in kent/src/hg/geoIp/ + +I leave it to others to extend this utility to process a list instead of just a commandline option. + +Or handle host lookups you can see an example in kent/src/utils/dnsInfo/dnsInfo.c