code: public synchronized boolean stopServer() {
  
          if (!isProxyRunning) {
              return false;
          }
  
          isProxyRunning = false;
          HttpUtil.closeServerSocket(proxySocket);
  
          try {
              thread.join();   //(PORT_TIME_OUT);
              
          } catch (Exception e) {
          }
  
          proxySocket = null;
  
          return true;
      }
docs: Stops the proxy server.
  
  @return {@code true} if the proxy server was stopped, {@code false} if it was not running.