Class ProxyServer


  • public class ProxyServer
    extends Object
    Represents a proxy server.
    • Constructor Detail

      • ProxyServer

        public ProxyServer​(String host,
                           int port,
                           int securedPort,
                           @Nullable
                           @Nullable Realm realm,
                           List<String> nonProxyHosts,
                           ProxyType proxyType,
                           @Nullable
                           @Nullable Function<Request,​io.netty.handler.codec.http.HttpHeaders> customHeaders)
    • Method Detail

      • getHost

        public String getHost()
      • getPort

        public int getPort()
      • getSecuredPort

        public int getSecuredPort()
      • getNonProxyHosts

        public List<String> getNonProxyHosts()
      • getRealm

        @Nullable
        public @Nullable Realm getRealm()
      • getProxyType

        public ProxyType getProxyType()
      • getCustomHeaders

        @Nullable
        public @Nullable Function<Request,​io.netty.handler.codec.http.HttpHeaders> getCustomHeaders()
      • isIgnoredForHost

        public boolean isIgnoredForHost​(String hostname)
        Checks whether proxy should be used according to nonProxyHosts settings of it, or we want to go directly to target host. If null proxy is passed in, this method returns true -- since there is NO proxy, we should avoid to use it. Simple hostname pattern matching using "*" are supported, but only as prefixes.
        Parameters:
        hostname - the hostname
        Returns:
        true if we have to ignore proxy use (obeying non-proxy hosts settings), false otherwise.
        See Also:
        Networking Properties