HttpClient4 设置代理

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

HttpClient4 设置代理

DefaultHttpClient client = new DefaultHttpClient();
HttpHost proxy = new HttpHost(ip, port);
client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);