// Trivial subclass of HttpProxy
// Does not log host names and
// puts a * in front of each line of log output

import java.io.*;
import java.net.*;

public class SubHttpProxy extends HttpProxy {
    static private boolean first=true;
    public SubHttpProxy(Socket s) {
      super(s);
      }
    public void writeLog(int c, boolean browser) throws IOException {
      if (first) log.write('*');
      first=false;
      log.write(c);
      if (c=='\n') log.write('*');
    }
    public String processHostName(String url, String host, int port, Socket sock) {
// do nothing
    return host;
    }
// Very simple test main
    static public void main(String args[]) {
       System.out.println("Starting Subproxy on port 808<BR>");
       HttpProxy.log=System.out;
       HttpProxy.logging=true;
       HttpProxy.startProxy(808,SubHttpProxy.class);
      }


}
