From 4ff0b1a910b2c72ef133ba65a1bceb4be0932c87 Mon Sep 17 00:00:00 2001 From: Niki Date: Wed, 10 Apr 2019 13:58:55 +0200 Subject: [PATCH] Proxy: step one (missing proxy from nikiroo-utils) --- src/be/nikiroo/fanfix/Instance.java | 4 ++++ src/be/nikiroo/fanfix/bundles/Config.java | 2 ++ src/be/nikiroo/fanfix/bundles/config.properties | 2 ++ 3 files changed, 8 insertions(+) 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 = -- 2.27.0