aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-07-12 15:53:40 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-07-12 15:53:40 +0200
commit2c6bc849e09644f62b791ffe4779bfdcc34e5a80 (patch)
tree044c74862400db6c44252f894c5f4cc67b9f6fa2
parentda51fd97881792acb328e6e2338f53434e2e97cb (diff)
parent26ed0e5c9571dfdaac22f147bda793cc25c9e661 (diff)
Merge branch 'curlOptions' of https://github.com/Alkarex/FreshRSS into Alkarex-curlOptions
-rw-r--r--CHANGELOG.md2
-rw-r--r--data/config.default.php19
-rw-r--r--lib/SimplePie/SimplePie/File.php1
-rw-r--r--lib/lib_rss.php1
4 files changed, 20 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0ebfd50ac..23feda577 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,7 +4,9 @@
* Features
* Support for PubSubHubbub for instant notifications from compatible Web sites. [#312](https://github.com/FreshRSS/FreshRSS/issues/312)
+ * cURL options to use a proxy for retrieving feeds. [#897](https://github.com/FreshRSS/FreshRSS/issues/897) [#675](https://github.com/FreshRSS/FreshRSS/issues/675)
* Security
+ * cURL options to verify or not SSL/TLS certificates (now enabled by default). [#897](https://github.com/FreshRSS/FreshRSS/issues/897) [#502](https://github.com/FreshRSS/FreshRSS/issues/502)
* Support for SSL connection to MySQL. [#868](https://github.com/FreshRSS/FreshRSS/issues/868)
* Workaround for browsers that have disabled support for `<form autocomplete="off">`. [#880](https://github.com/FreshRSS/FreshRSS/issues/880)
* UI
diff --git a/data/config.default.php b/data/config.default.php
index 97085df29..9a3ec87d7 100644
--- a/data/config.default.php
+++ b/data/config.default.php
@@ -1,7 +1,7 @@
<?php
-# Do not modify this file, which is only a template.
-# See `config.php` after the install process is completed.
+# Do not modify this file, which defines default values,
+# but edit `config.php` instead, after the install process is completed.
return array(
# Set to `development` to get additional error messages,
@@ -79,6 +79,21 @@ return array(
),
+ # Options used by cURL when making HTTP requests, e.g. when the SimplePie library retrieves feeds.
+ # http://php.net/manual/function.curl-setopt
+ 'curl_options' => array(
+ # Options to disable SSL/TLS certificate check (e.g. for self-signed HTTPS)
+ //CURLOPT_SSL_VERIFYHOST => 0,
+ //CURLOPT_SSL_VERIFYPEER => false,
+
+ # Options to use a proxy for retrieving feeds.
+ //CURLOPT_PROXYTYPE => CURLPROXY_HTTP,
+ //CURLOPT_PROXY => '127.0.0.1',
+ //CURLOPT_PROXYPORT => 8080,
+ //CURLOPT_PROXYAUTH => CURLAUTH_BASIC,
+ //CURLOPT_PROXYUSERPWD => 'user:password',
+ ),
+
'db' => array(
# Type of database: `sqlite` or `mysql`.
diff --git a/lib/SimplePie/SimplePie/File.php b/lib/SimplePie/SimplePie/File.php
index 643648ddb..45994d102 100644
--- a/lib/SimplePie/SimplePie/File.php
+++ b/lib/SimplePie/SimplePie/File.php
@@ -113,7 +113,6 @@ class SimplePie_File
curl_setopt($fp, CURLOPT_REFERER, $url);
curl_setopt($fp, CURLOPT_USERAGENT, $useragent);
curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2);
- curl_setopt($fp, CURLOPT_SSL_VERIFYPEER, false); //FreshRSS
if (!ini_get('open_basedir') && !ini_get('safe_mode') && version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>='))
{
curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1);
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index c51b4e6de..0118e0f46 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -143,6 +143,7 @@ function customSimplePie() {
$simplePie->set_cache_location(CACHE_PATH);
$simplePie->set_cache_duration($limits['cache_duration']);
$simplePie->set_timeout($limits['timeout']);
+ $simplePie->set_curl_options($system_conf->curl_options);
$simplePie->strip_htmltags(array(
'base', 'blink', 'body', 'doctype', 'embed',
'font', 'form', 'frame', 'frameset', 'html',