Ensure that socks5 proxy is used for rss
This commit is contained in:
parent
a1d4409b39
commit
b1b186ba4e
|
@ -8307,6 +8307,13 @@ function install_rss_reader {
|
|||
cd $RSS_READER_PATH
|
||||
git_pull $RSS_READER_REPO $RSS_READER_COMMIT
|
||||
sed -i "s/RSS reader commit.*/RSS reader commit:$RSS_READER_COMMIT/g" $COMPLETION_FILE
|
||||
# ensure that socks5 proxy is used
|
||||
if ! grep -q "CURLOPT_PROXYTYPE" $RSS_READER_PATH/plugins/af_unburn/init.php; then
|
||||
sed -i '/curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);/a \\t\t\t\t\tcurl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);' $RSS_READER_PATH/plugins/af_unburn/init.php
|
||||
fi
|
||||
if ! grep -q "CURLOPT_PROXYTYPE" $RSS_READER_PATH/include/functions.php; then
|
||||
sed -i '/curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);/a \\t\t\t\tcurl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);' $RSS_READER_PATH/include/functions.php
|
||||
fi
|
||||
chown -R www-data:www-data $RSS_READER_PATH
|
||||
fi
|
||||
else
|
||||
|
@ -8460,6 +8467,14 @@ function install_rss_reader {
|
|||
echo " define('CONFIG_VERSION', 26);" >> $RSS_READER_PATH/config.php
|
||||
fi
|
||||
|
||||
# ensure that socks5 proxy is used
|
||||
if ! grep -q "CURLOPT_PROXYTYPE" $RSS_READER_PATH/plugins/af_unburn/init.php; then
|
||||
sed -i '/curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);/a \\t\t\t\t\tcurl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);' $RSS_READER_PATH/plugins/af_unburn/init.php
|
||||
fi
|
||||
if ! grep -q "CURLOPT_PROXYTYPE" $RSS_READER_PATH/include/functions.php; then
|
||||
sed -i '/curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);/a \\t\t\t\tcurl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);' $RSS_READER_PATH/include/functions.php
|
||||
fi
|
||||
|
||||
chown -R www-data:www-data $RSS_READER_PATH
|
||||
chmod a+x $RSS_READER_PATH
|
||||
|
||||
|
|
Loading…
Reference in New Issue