Class ProxyInfo

java.lang.Object
org.geysermc.mcprotocollib.network.ProxyInfo

public class ProxyInfo extends Object
Information describing a network proxy.
  • Constructor Details

    • ProxyInfo

      public ProxyInfo(ProxyInfo.Type type, SocketAddress address)
      Creates a new unauthenticated ProxyInfo instance.
      Parameters:
      type - Type of proxy.
      address - Network address of the proxy.
    • ProxyInfo

      public ProxyInfo(ProxyInfo.Type type, SocketAddress address, String username, String password)
      Creates a new authenticated ProxyInfo instance.
      Parameters:
      type - Type of proxy.
      address - Network address of the proxy.
      username - Username to authenticate with.
      password - Password to authenticate with.
  • Method Details

    • getType

      public ProxyInfo.Type getType()
      Gets the proxy's type.
      Returns:
      The proxy's type.
    • getAddress

      public SocketAddress getAddress()
      Gets the proxy's network address.
      Returns:
      The proxy's network address.
    • isAuthenticated

      public boolean isAuthenticated()
      Gets whether the proxy is authenticated with.
      Returns:
      Whether to authenticate with the proxy.
    • getUsername

      public String getUsername()
      Gets the proxy's authentication username.
      Returns:
      The username to authenticate with.
    • getPassword

      public String getPassword()
      Gets the proxy's authentication password.
      Returns:
      The password to authenticate with.