java.lang.Object
net.i2p.router.transport.GeoIPv6

public class GeoIPv6extends Object
Generate compressed geoipv6.dat.gz file, and lookup entries in it.

Public only for command line use, not a public API, not for external use.

  • Method Details

    • readGeoIPFile

      public static String[] readGeoIPFile(I2PAppContext context, Long[] search, Map<String,String> codeCache)
      Lookup search items in the geoip file. See below for format.
      Parameters:
      context - the I2P app context
      search - a sorted array of IPs to search
      codeCache - the country code cache
      Returns:
      an array of country codes, same order as the search param, or a zero-length array on total failure. Individual array elements will be null for lookup failure of that item.
    • main

      public static void main(String[] args)
      Merge and compress CSV files to I2P compressed format

      GeoIPv6 infile1.csv[.gz] [infile2.csv[.gz]...] outfile.dat.gz

      Used to create the file for distribution, do not comment out.

      Parameters:
      args - command line arguments