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.

Resolved once per start and shared, because a host may bind several listeners and each would otherwise fetch the same list again.

  • 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
    • invalidate

      public static void invalidate()
      Forgets the resolved list so the next listener to start fetches it again.