forward proxy

by GwennG, Friday, January 18, 2019, 15:32 (1949 days ago)

Hi all,

I'm currently setting up my first selfoss installation but can't get it to download feeds using a forward proxy.

I have not seen configuration option in config.ini to define a forward proxy so I tried adding some environment variables in apache VirtualHost:

SetEnv http_proxy=http://proxyhost:3128/
SetEnv https_proxy=http://proxyhost:3128/

curl is supposed to check these variables and use the proxy if defined but updates fail because of timeout:

[2019-01-18 14:44:28] selfoss.ERROR: error loading feed content for foobar {"exception":"[object] (Exception(co
de: 0): cURL error 28: Connection timed out after 10000 milliseconds at /var/www/selfoss/selfoss-2.18/spouts/rss/feed
#0 /var/www/selfoss/selfoss-2.18/helpers/ContentLoader.php(99): spouts\^Mss\\feed->load(Array)
#1 /var/www/selfoss/selfoss-2.18/helpers/ContentLoader.php(35): helpers\\ContentLoader->fetch(Array)
#2 /var/www/selfoss/selfoss-2.18/controllers/Index.php(181): helpers\\ContentLoader->update()
#3 /var/www/selfoss/selfoss-2.18/vendor/bcosca/fatfree-core/base.php(1806): controllers\\Index->update(Object(Base),
Array, 'controllers\\\\Ind...') #4 /var/www/selfoss/selfoss-2.18/vendor/bcosca/fatfree-core/base.php(1627): Base->call(Array, Array, Array)
#5 /var/www/selfoss/selfoss-2.18/index.php(80): Base->run()
#6 {main}

Does anyone use selfoss with a forward proxy?
If yes, how?

forward proxy

by GwennG, Friday, January 18, 2019, 16:38 (1949 days ago) @ GwennG

Just found opened issue #871
After fixing my SetEnv with the correct mod_env syntax, it still does not work.

SetEnv http_proxy http://proxyhost:3128/
SetEnv https_proxy http://proxyhost:3128/
SetEnv all_proxy http://proxyhost:3128/

I also tried with cliupdate.php and defined environment variables but still times out.

I'll try the fix described in #871.

forward proxy

by jtojnar, Saturday, January 19, 2019, 06:20 (1949 days ago) @ GwennG

forward proxy

by GwennG, Monday, January 21, 2019, 11:10 (1947 days ago) @ jtojnar

Thanks jtojnar,

I switched to master branch and modified helpers/WebClient.php to add 'proxy' in 'defaults' and now I can add and update feeds through squid proxy.

With version 2.18, I was also having some PDO issues that disappeared with the master branch:

selfoss.ERROR: PDO: near "0": syntax error

RSS Feed of thread
powered by my little forum