Class IpLists

java.lang.Object
org.frontcache.guard.IpLists

public final class IpLists extends Object
The address lists under conf/lists/ - the ones that change while the node runs. A client-ip:@lists/... predicate reads its list through here rather than copying it at load: a plugin's PluginContext.writeList replaces the list in place, and every rule naming it - in guard-rules.conf and bots.conf alike - sees the new content at once, with no reload.

Two things differ from any other client-ip:@file, because a list here is somebody's moving output: a missing file is an empty list (a WARN, not a refused rule - the plugin that writes it may not have run yet), and an empty list is legal. A rule load re-reads a file whose size or modification time changed since it was read, so an operator's own cron writing here is picked up by the next reload, as before.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    One list as the rules read it.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The directory under conf/, with its slash: @lists/banned.txt.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isLive(String name)
    Whether a @file name is a live list.
    static void
    publish(String name, List<Cidr> blocks, File file)
    writeList's last step: the file was replaced, and this is what it now holds.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DIRECTORY

      public static final String DIRECTORY
      The directory under conf/, with its slash: @lists/banned.txt.
      See Also:
  • Method Details

    • isLive

      public static boolean isLive(String name)
      Whether a @file name is a live list.
    • publish

      public static void publish(String name, List<Cidr> blocks, File file)
      writeList's last step: the file was replaced, and this is what it now holds.