aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers/feed/update.phtml
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 /app/views/helpers/feed/update.phtml
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 'app/views/helpers/feed/update.phtml')
-rw-r--r--app/views/helpers/feed/update.phtml11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index 7dd71a0da..92fedd992 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -740,7 +740,7 @@
<div class="group-controls">
<input type="text" name="curl_params_useragent" id="curl_params_useragent" class="w100" value="<?=
htmlspecialchars((string)($curlParams[CURLOPT_USERAGENT] ?? ''), ENT_COMPAT, 'UTF-8')
- ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ ?>" placeholder="<?= _t('gen.short.by_default') ?>" />
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.useragent_help') ?></p>
</div>
</div>
@@ -750,14 +750,19 @@
<div class="group-controls">
<select name="proxy_type" id="proxy_type"><?php
$type = $curlParams[CURLOPT_PROXYTYPE] ?? '';
- foreach (['' => '', 3 => 'NONE', 0 => 'HTTP', 2 => 'HTTPS', 4 => 'SOCKS4', 6 => 'SOCKS4A', 5 => 'SOCKS5', 7 => 'SOCKS5H'] as $k => $v) {
+ if ($type === 3) { // Legacy for NONE
+ $type = -1;
+ }
+ foreach (['' => '', -1 => 'NONE', CURLPROXY_HTTP => 'HTTP', CURLPROXY_HTTPS => 'HTTPS',
+ CURLPROXY_SOCKS4 => 'SOCKS4', CURLPROXY_SOCKS4A => 'SOCKS4A', CURLPROXY_SOCKS5 => 'SOCKS5',
+ CURLPROXY_SOCKS5_HOSTNAME => 'SOCKS5H'] as $k => $v) {
echo '<option value="' . $k . ($type === $k ? '" selected="selected' : '' ) . '">' . $v . '</option>';
}
?>
</select>
<input type="text" name="curl_params" id="curl_params" value="<?=
htmlspecialchars((string)($curlParams[CURLOPT_PROXY] ?? ''), ENT_COMPAT, 'UTF-8')
- ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ ?>" placeholder="<?= _t('gen.short.by_default') ?>" />
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.proxy_help') ?></p>
</div>
</div>