Class ProxyServer.Builder

  • Enclosing class:
    ProxyServer

    public static class ProxyServer.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder​(String host,
                       int port)
    • Method Detail

      • setCustomHeaders

        public ProxyServer.Builder setCustomHeaders​(Function<Request,​io.netty.handler.codec.http.HttpHeaders> customHeaders)
        Headers for the proxy itself, sent only on a request the proxy reads: an absolute-form request or a CONNECT. A SOCKS proxy never parses the HTTP it carries, so it gets none.

        An HTTP proxy forwards what it does not recognise, so to keep one of these off the origin, name it in a Connection header of the same set.

        Called once per request built for the proxy, on an I/O thread.