@@ -0,0 +1,1114 @@
+package com.geccocrawler.gecco.downloader;%0A%0Aimport java.util.concurrent.atomic.AtomicLong;%0A%0Aimport org.apache.http.HttpHost;%0A%0Apublic class Proxy %7B%0A%09%0A%09private HttpHost httpHost;%0A%09%0A%09private AtomicLong successCount;%0A%09%0A%09private AtomicLong failureCount;%0A%09%0A%09public Proxy(String host, int port) %7B%0A%09%09this.httpHost = new HttpHost(host, port);%0A%09%09this.successCount = new AtomicLong(0);%0A%09%09this.failureCount = new AtomicLong(0);%0A%09%7D%0A%0A%09public HttpHost getHttpHost() %7B%0A%09%09return httpHost;%0A%09%7D%0A%0A%09public void setHttpHost(HttpHost httpHost) %7B%0A%09%09this.httpHost = httpHost;%0A%09%7D%0A%0A%09public AtomicLong getSuccessCount() %7B%0A%09%09return successCount;%0A%09%7D%0A%0A%09public void setSuccessCount(AtomicLong successCount) %7B%0A%09%09this.successCount = successCount;%0A%09%7D%0A%0A%09public AtomicLong getFailureCount() %7B%0A%09%09return failureCount;%0A%09%7D%0A%0A%09public void setFailureCount(AtomicLong failureCount) %7B%0A%09%09this.failureCount = failureCount;%0A%09%7D%0A%0A%09public String toHostString() %7B%0A%09%09return httpHost.toHostString();%0A%09%7D%0A%0A%09@Override%0A%09public String toString() %7B%0A%09%09return %22Proxy %5BhttpHost=%22 + httpHost + %22, successCount=%22 + successCount%0A%09%09%09%09+ %22, failureCount=%22 + failureCount + %22%5D%22;%0A%09%7D%0A%09%0A%7D%0A

支持记录代理成功率，自动发现无效代理，支持在线添加代理