From: Niki Roo Date: Wed, 13 May 2020 17:12:50 +0000 (+0200) Subject: add blacklist support X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=d11fb35b34e44744c8b1f9226321f133af4eb151;p=fanfix.git add blacklist support --- diff --git a/src/be/nikiroo/fanfix/bundles/Config.java b/src/be/nikiroo/fanfix/bundles/Config.java index c96ed22..86744b4 100644 --- a/src/be/nikiroo/fanfix/bundles/Config.java +++ b/src/be/nikiroo/fanfix/bundles/Config.java @@ -102,9 +102,12 @@ public enum Config { @Meta(description = "Allow write access to the clients (download story, move story...) without RW subkeys", // format = Format.BOOLEAN, def = "true") SERVER_RW, // - @Meta(description = "If not empty, only the EXACT listed sources will be available for clients without BL subkeys",// + @Meta(description = "If not empty, only the EXACT listed sources will be available for clients without a WL subkey",// array = true, format = Format.STRING, def = "") SERVER_WHITELIST, // + @Meta(description = "Those sources will not be available for clients without a BL subkey",// + array = true, format = Format.STRING, def = "") + SERVER_BLACKLIST, // @Meta(description = "The subkeys that the server will allow, including the modes\nA subkey is used as a login for HTTP (clear text protocol) and HTTPS modes", // array = true, format = Format.STRING, def = "") SERVER_ALLOWED_SUBKEYS, // diff --git a/src/be/nikiroo/fanfix/library/RemoteLibrary.java b/src/be/nikiroo/fanfix/library/RemoteLibrary.java index 9fa8c66..83bb212 100644 --- a/src/be/nikiroo/fanfix/library/RemoteLibrary.java +++ b/src/be/nikiroo/fanfix/library/RemoteLibrary.java @@ -62,7 +62,7 @@ public class RemoteLibrary extends BasicLibrary { * Create a {@link RemoteLibrary} linked to the given server. *

* Note that the key is structured: - * xxx(|yyy|wl)(|rw) + * xxx(|yyy(|wl)(|bl)(|rw) *

* Note that anything before the first pipe (|) character is * considered to be the encryption key, anything after that character is @@ -77,16 +77,16 @@ public class RemoteLibrary extends BasicLibrary { *

  • yyy: the secondary key
  • *
  • rw: flag to allow read and write access if it is not the * default on this server
  • - *
  • wl: flag to allow access to all the stories (bypassing the - * whitelist if it exists)
  • + *
  • bl: flag to bypass the blacklist (if it exists)
  • + *
  • wl: flag to bypass the whitelist if it exists
  • * *

    * Some examples: *