package api.jisuapi.proxy;
import api.util.HttpUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
public class Get {
public static final String APPKEY = "your_appkey_here";// 你的appkey
public static final String URL = "https://api.jisuapi.com/proxy/get";
public static final int num = 100;// 提取数量
public static final String area = "";// 区域(多个用,隔开)
public static final String areaex = "";// 排除区域(多个用,隔开)
public static final String type = "";// 匿名(1高匿名,2匿名,3透明)
public static final String port = "";// 端口(多个用,隔开)
public static final String portex = "";// 排除端口(多个用,隔开)
public static final String protocol = "";// 协议 1 HTTP, 2 HTTPS(也支持HTTP)
public static void IPGet() {
String result = null;
String url = URL + "?num=" + num + "&area=" + area + "&areaex=" + areaex + "&type=" + type + "&port=" + port
+ "&portex=" + portex + "&protocol=" + protocol + "&appkey=" + APPKEY;
try {
result = HttpUtil.sendGet(url, "utf-8");
JSONObject json = JSONObject.fromObject(result);
if (json.getInt("status") != 0) {
System.out.println(json.getString("msg"));
} else {
JSONObject resultarr = json.optJSONObject("result");
JSONArray list = resultarr.optJSONArray("list");
for (int i = 0; i < list.size(); i++) {
JSONObject obj = (JSONObject) list.opt(i);
String ip = obj.getString("ip");
String area = obj.getString("area");
String anonymity = obj.getString("anonymity");
String protocol = obj.getString("protocol");
String speed = obj.getString("speed");
System.out.println(ip + " " + area + " " + anonymity + " " + protocol + " " + speed);
}
String count = resultarr.getString("count");
System.out.println(count);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}


© 2015-2025 杭州极速互联科技有限公司 版权所有 浙ICP备17047587号-4 浙公网安备33010502005096 增值电信业务经营许可证:浙B2-20190875