From ea55f2e11c162db8edeac1a39f861d5ad2381a60 Mon Sep 17 00:00:00 2001 From: martin scharm Date: Sun, 14 Jan 2018 00:30:22 +0100 Subject: Add proper support for proxies There are situations where you want tt-rss to use a proxy (e.g. because of network restrictions, or privacy concerns). tt-rss already comes with an undocumented `_CURL_HTTP_PROXY` variable (see eg https://binfalse.de/2015/05/06/ttrss-with-proxy/), however that won't have an effect when, for example, php-curl is not installed, see https://git.tt-rss.org/git/tt-rss/src/c30f5e18119d1935e8fe6d422053b127e8f4f1b3/include/functions.php#L377 In this case it would use the `file_get_contents` with a stream context without a proxy definition: https://git.tt-rss.org/git/tt-rss/src/c30f5e18119d1935e8fe6d422053b127e8f4f1b3/include/functions.php#L487 Here I propose to properly support proxies, and I introduced a `PROXY` variable, that is respected in both scenarios, with and without curl installed. --- config.php-dist | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config.php-dist') diff --git a/config.php-dist b/config.php-dist index 7a076d976..f9cc181af 100644 --- a/config.php-dist +++ b/config.php-dist @@ -196,4 +196,9 @@ // Expected config version. Please update this option in config.php // if necessary (after migrating all new options from this file). + define('PROXY', ''); + // Connect to RSS feeds through a PROXY, this way tt-rss won't connect to + // webservers directly. + // Example format: '127.0.0.1:8123' (polipo proxy running on localhost) + // vim:ft=php -- cgit v1.2.3-54-g00ecf