aboutsummaryrefslogtreecommitdiff
path: root/lib/lib_rss.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-01-25 09:14:08 +0100
committerGravatar GitHub <noreply@github.com> 2025-01-25 09:14:08 +0100
commit22b74b0a5790360d81088a83addab1f98b7f7947 (patch)
tree2b08182a24cef248ac7ec9bb45c375cb33eb2f55 /lib/lib_rss.php
parent68497030f988cac483a67b27b96d2ac90a54856e (diff)
Improve cURL proxy options (#7231)
3 is now used for CURLPROXY_HTTPS2 https://github.com/curl/curl/blob/f07612cd9ae1ec50b9bedd749171ad75203c9e7e/include/curl/curl.h#L789 Related to https://github.com/FreshRSS/FreshRSS/issues/7209
Diffstat (limited to 'lib/lib_rss.php')
-rw-r--r--lib/lib_rss.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 2a5bdd02f..f0a070820 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -329,6 +329,13 @@ function customSimplePie(array $attributes = [], array $curl_options = []): \Sim
}
}
}
+ if (!empty($curl_options[CURLOPT_PROXYTYPE]) && ($curl_options[CURLOPT_PROXYTYPE] < 0 || $curl_options[CURLOPT_PROXYTYPE] === 3)) {
+ // 3 is legacy for NONE
+ unset($curl_options[CURLOPT_PROXYTYPE]);
+ if (isset($curl_options[CURLOPT_PROXY])) {
+ unset($curl_options[CURLOPT_PROXY]);
+ }
+ }
$simplePie->set_curl_options($curl_options);
$simplePie->strip_comments(true);