code: public void setSoTimeout(int timeout) throws SocketException{
        super.setSoTimeout(timeout);
        if(!doing_direct) proxy.proxySocket.setSoTimeout(timeout);
     }
docs: Set Timeout.
  
  @param timeout Amount of time in milliseconds, accept should wait for
  incoming connection before failing with exception.
  Zero timeout implies infinity.