From: Niki Date: Wed, 10 Apr 2019 11:58:55 +0000 (+0200) Subject: Proxy: step one (missing proxy from nikiroo-utils) X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=commitdiff_plain;h=4ff0b1a910b2c72ef133ba65a1bceb4be0932c87 Proxy: step one (missing proxy from nikiroo-utils) --- diff --git a/src/be/nikiroo/fanfix/Instance.java b/src/be/nikiroo/fanfix/Instance.java index cacbbfe..733c16c 100644 --- a/src/be/nikiroo/fanfix/Instance.java +++ b/src/be/nikiroo/fanfix/Instance.java @@ -52,6 +52,10 @@ public class Instance { // Most of the rest is dependent upon this: createConfigs(configDir, false); + + // Proxy support + // TODO: include new nikiroo-utils version + // Proxy.use(Instance.getConfig().getString(Config.USE_PROXY)); // update tracer: boolean debug = Instance.getConfig() diff --git a/src/be/nikiroo/fanfix/bundles/Config.java b/src/be/nikiroo/fanfix/bundles/Config.java index ecbfa3d..74beeae 100644 --- a/src/be/nikiroo/fanfix/bundles/Config.java +++ b/src/be/nikiroo/fanfix/bundles/Config.java @@ -64,6 +64,8 @@ public enum Config { LOGIN_YIFFSTAR_PASS, // @Meta(description = "If the last update check was done at least that many days, check for updates at startup (-1 for 'no checks' -- default is 1 day)", format = Format.INT) UPDATE_INTERVAL, // + @Meta(def = "", description = "", info = "Format is ((user(:pass)@)proxy:port), with ':' being system proxy and an empty String being no proxy") + USE_PROXY, @Meta(description = "An API key required to create a token from FimFiction", format = Format.STRING) LOGIN_FIMFICTION_APIKEY_CLIENT_ID, // @Meta(description = "An API key required to create a token from FimFiction", format = Format.PASSWORD) diff --git a/src/be/nikiroo/fanfix/bundles/config.properties b/src/be/nikiroo/fanfix/bundles/config.properties index 8f22f9f..6409539 100644 --- a/src/be/nikiroo/fanfix/bundles/config.properties +++ b/src/be/nikiroo/fanfix/bundles/config.properties @@ -77,6 +77,8 @@ LOGIN_YIFFSTAR_PASS = # If the last update check was done at least that many days, check for updates at startup (-1 for 'no checks' -- default is 1 day) # (FORMAT: INT) UPDATE_INTERVAL = +# (FORMAT: STRING) Format is ((user(:pass)@)proxy:port), with ':' being system proxy and an empty String being no proxy +USE_PROXY = # An API key required to create a token from FimFiction # (FORMAT: STRING) LOGIN_FIMFICTION_APIKEY_CLIENT_ID =