From 32dc9ec854f9c317266584ecb33127f469d4bd80 Mon Sep 17 00:00:00 2001 From: martin scharm Date: Thu, 18 Jan 2018 08:48:53 +0100 Subject: [PATCH] undocumenting the proxy settings [see #36] in response to https://git.tt-rss.org/git/tt-rss/pulls/36#issuecomment-119 --- config.php-dist | 5 ----- include/functions.php | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/config.php-dist b/config.php-dist index f9cc181a..7a076d97 100644 --- a/config.php-dist +++ b/config.php-dist @@ -196,9 +196,4 @@ // 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 diff --git a/include/functions.php b/include/functions.php index 2c6b5133..dfa78a8a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -402,8 +402,8 @@ curl_setopt($ch, CURLOPT_COOKIEJAR, "/dev/null"); } - if (defined('PROXY')) { - curl_setopt($ch, CURLOPT_PROXY, PROXY); + if (defined('_HTTP_PROXY')) { + curl_setopt($ch, CURLOPT_PROXY, _HTTP_PROXY); } if ($post_query) { @@ -495,9 +495,9 @@ $context_options['http']['header'] = "If-Modified-Since: $last_modified\r\n"; } - if (defined('PROXY')) { + if (defined('_HTTP_PROXY')) { $context_options['http']['request_fulluri'] = true; - $context_options['http']['proxy'] = PROXY; + $context_options['http']['proxy'] = _HTTP_PROXY; } $context = stream_context_create($context_options); -- 2.39.5