Class TrustedProxies

java.lang.Object
org.cloudburstmc.netty.util.nethernet.TrustedProxies

public final class TrustedProxies extends Object
The proxies allowed to speak for a client, with any http or https entry fetched and expanded into the addresses it lists, one per line.

Stateless: every call fetches its URL entries again, so parse once when a listener starts and keep the set, rather than on each connection.

  • Field Details

    • FETCH_PROPERTY

      public static final String FETCH_PROPERTY
      Whether a http or https entry is fetched at all, true by default.

      The list decides who may speak for a client, so fetching one puts that decision on a remote server and makes the host reach out to it on every start. An operator who would rather keep the answer in the configuration file can set this to false, and a URL entry is then refused rather than quietly trusted.

      See Also:
  • Method Details

    • parse

      public static IpRangeSet parse(Collection<String> entries)
      Parameters:
      entries - The configured entries, each an address, a CIDR range or a URL to fetch
      Returns:
      The addresses that may speak for a client, empty when nothing is configured