code: public void doHandshake(final NextFilter nextFilter)
              throws ProxyAuthException {
          logger.debug(" doHandshake()");
  
          if (authHandler != null) {
              authHandler.doHandshake(nextFilter);
          } else {
              if (requestSent) {
                  // Safety check
                  throw new ProxyAuthException(
                          "Authentication request already sent");
              }
  
              logger.debug("  sending HTTP request");
  
              // Compute request headers
              HttpProxyRequest req = (HttpProxyRequest) getProxyIoSession()
                      .getRequest();
              Map<String, List<String>> headers = req.getHeaders() != null ? req
                      .getHeaders() : new HashMap<>();
  
              AbstractAuthLogicHandler.addKeepAliveHeaders(headers);
              req.setHeaders(headers);
  
              // Write request to the proxy
              writeRequest(nextFilter, req);
              requestSent = true;
          }
      }
docs: Performs the handshake processing.
  
  @param nextFilter the next filter