public class HttpProxy extends Thread { static public int CONNECT_RETRIES=5; static public int CONNECT_PAUSE=5; static public int TIME-OUT=50; static public int BUFSIZ=1024; static public boolean logging = false; static public OutputStream log=null; // 传入数据用的Socket protected Socket socket; // 上级代理服务器,可选 static private String parent=null; static private int parentPort=-1; static public void setParentProxy(String name, int pport) { parent=name; parentPort=pport; }
// 在给定Socket上创建一个代理线程。 public HttpProxy(Socket s) { socket=s; start(); }