package cn.reghao.tnb.search.app.ip;

/**
 * @author reghao
 * @date 2025-03-12 17:16:31
 */
public class IpTool {
    static String filePath = "/home/reghao/Downloads/qqwry.dat";
    static IPLocation ipLocation;
    static {
        try {
            ipLocation = new IPLocation(filePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


    public static String getLocation(String ip) {
        Location loc = ipLocation.fetchIPLocation(ip);
        return loc.toString();
    }
}
