From ec85beba5f3dece1d9519356be99e7851c2705dd Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 21 Aug 2023 09:39:53 +0100 Subject: [PATCH] Update reqwest4j. --- build.gradle | 2 +- config.properties | 3 +++ src/main/java/me/kavin/piped/consts/Constants.java | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 63a1cbd..8456b6c 100644 --- a/build.gradle +++ b/build.gradle @@ -41,7 +41,7 @@ dependencies { implementation 'com.squareup.okhttp3:okhttp' implementation 'com.squareup.okhttp3:okhttp-brotli' implementation 'io.sentry:sentry:6.28.0' - implementation 'rocks.kavin:reqwest4j:1.0.9' + implementation 'rocks.kavin:reqwest4j:1.0.10' implementation 'io.minio:minio:8.5.5' } diff --git a/config.properties b/config.properties index 56ec594..9b5fed0 100644 --- a/config.properties +++ b/config.properties @@ -8,6 +8,9 @@ PROXY_PART:https://pipedproxy-cdg.kavin.rocks # Outgoing proxy to be used by reqwest4j - eg: socks5://127.0.0.1:1080 #REQWEST_PROXY: socks5://127.0.0.1:1080 +# Optional proxy username and password +#REQWEST_PROXY_USER: username +#REQWEST_PROXY_PASS: password # Captcha Parameters CAPTCHA_BASE_URL:https://api.capmonster.cloud/ diff --git a/src/main/java/me/kavin/piped/consts/Constants.java b/src/main/java/me/kavin/piped/consts/Constants.java index 8c3fc79..516ece6 100644 --- a/src/main/java/me/kavin/piped/consts/Constants.java +++ b/src/main/java/me/kavin/piped/consts/Constants.java @@ -51,6 +51,8 @@ public class Constants { public static final String PUBSUB_HUB_URL; public static final String REQWEST_PROXY; + public static final String REQWEST_PROXY_USER; + public static final String REQWEST_PROXY_PASS; public static final String FRONTEND_URL; @@ -131,7 +133,9 @@ public class Constants { PUBSUB_URL = getProperty(prop, "PUBSUB_URL", PUBLIC_URL); PUBSUB_HUB_URL = getProperty(prop, "PUBSUB_HUB_URL", "https://pubsubhubbub.appspot.com/subscribe"); REQWEST_PROXY = getProperty(prop, "REQWEST_PROXY"); - ReqwestUtils.init(REQWEST_PROXY); + REQWEST_PROXY_USER = getProperty(prop, "REQWEST_PROXY_USER"); + REQWEST_PROXY_PASS = getProperty(prop, "REQWEST_PROXY_PASS"); + ReqwestUtils.init(REQWEST_PROXY, REQWEST_PROXY_USER, REQWEST_PROXY_PASS); FRONTEND_URL = getProperty(prop, "FRONTEND_URL", "https://piped.video"); COMPROMISED_PASSWORD_CHECK = Boolean.parseBoolean(getProperty(prop, "COMPROMISED_PASSWORD_CHECK", "true")); DISABLE_REGISTRATION = Boolean.parseBoolean(getProperty(prop, "DISABLE_REGISTRATION", "false"));