Class ProxyProvider

java.lang.Object
reactor.netty.transport.ProxyProvider

public final class ProxyProvider extends Object
Proxy configuration.
Author:
Violeta Georgieva
  • Method Details

    • builder

      public static ProxyProvider.TypeSpec builder()
      Creates a builder for ProxyProvider.
      Returns:
      a new ProxyProvider builder
    • getType

      public final ProxyProvider.Proxy getType()
      The proxy type.
      Returns:
      The proxy type
    • getAddress

      @Deprecated public final Supplier<? extends InetSocketAddress> getAddress()
      Deprecated.
      as of 1.2.0. Prefer using getSocketAddress(). This method will be removed in 1.3.0.
      The supplier for the address to connect to.
      Returns:
      The supplier for the address to connect to.
    • getSocketAddress

      public final Supplier<? extends SocketAddress> getSocketAddress()
      The supplier for the address to connect to.
      Returns:
      The supplier for the address to connect to.
    • getProxyAddress

      public final SocketAddress getProxyAddress()
      The address to connect to.
      Returns:
      The address to connect to.
    • getNonProxyHostsPredicate

      public final Predicate<SocketAddress> getNonProxyHostsPredicate()
      A predicate Predicate on SocketAddress that returns true when the provided address should be reached directly, bypassing the proxy.
      Returns:
      The predicate Predicate to test the incoming SocketAddress if it should be reached directly, bypassing the proxy
      Since:
      0.9.10
    • newProxyHandler

      public final ProxyHandler newProxyHandler()
      Return a new eventual ProxyHandler.
      Returns:
      a new eventual ProxyHandler
    • shouldProxy

      public boolean shouldProxy(@Nullable SocketAddress address)
      Returns true when the given SocketAddress should be reached via the configured proxy. When the method returns false, the client should reach the address directly and bypass the proxy
      Parameters:
      address - the address to test
      Returns:
      true if of type InetSocketAddress and hostname candidate to proxy
    • addProxyHandler

      public void addProxyHandler(Channel channel)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object