Twitter module not working with Proxy

As suggested by Dan, additionally to the GitHub issue (https://github.com/xibosignage/xibo/issues/1335) I’m opening a new topic here.

Hi all,

I have some issues with the Twitter module.
The Twitter module works fine with direct connection to the internet. I configured both API key and secret, and I can get feeds.

BUT: as soon as I configure a proxy, it stops working.
Through Wireshark, I found out that the HTTP POST request to https://api.twitter.com/oauth2/token seems to be malformed in case it has to go via a proxy. Wireshark doesn’t decode the HTTP CONNECT (HTTPS Tunneling) request, and apparently also the proxy server doesn’t like it.
I tried to modify the curl options in /var/www/cms/lib/Widget/TwitterBase.php, but without success.

The rest of the connections via the proxy are fine. Other HTTP CONNECT requests are working, and also Wireshark displays them correctly.

Does anyone of you have an idea what could be wrong here? Is the problem the self-written header in /var/www/cms/lib/Widget/TwitterBase.php lines 48-52? Does it have to look differently in case of proxy connections?

Thanks for your help.

I’ve setup a local squid proxy.

CMS is configured as follows:

Proxy Host: tcp://ip.adddress
Proxy Port: 3128

RSS feeds are downloaded correctly via the proxy, however as you suggest Twitter API calls fail. CMS logs Unable to reach twitter api.

The proxy shows nothing in its log. It does look like there’s an issue there. I will target your original bug so that it’s looked at in a future release.

1 Like

Hi,

With Xibo 1.8.8 the module was changed and now Twitter is working also behind the proxy.
Currently I’m struggling with the search queries, but I’ll open a separate support ticket for it.

Thanks for resolving!