fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.35k stars 343 forks source link

how to set the proxy #1435

Open Vis-Wing opened 1 year ago

Vis-Wing commented 1 year ago

May I ask how to set the proxy in version 2.19

jtojnar commented 1 year ago

If you can set environment variables, ALL_PROXY should still work as described in https://github.com/fossar/selfoss/issues/871#issuecomment-278309078.

If not, you will need to modify the code as follows:

--- a/src/helpers/WebClient.php
+++ b/src/helpers/WebClient.php
@@ -62,6 +62,7 @@ class WebClient {
                 ],
                 'handler' => $stack,
                 'timeout' => 60, // seconds
+                'proxy' => 'http://user:password@proxy:8000',
             ]);

             $this->httpClient = $httpClient;

See Guzzle docs for more details on the option.