kulttuuri/SlackNotifications

Plugin usage with proxy

wimaerts opened this issue · 5 comments

I couldnt get the plugin to work. I managed to fix it myself in SlackNotificationsCore.php

...
global $wgSlackIncomingWebhookUrl, $wgSlackFromName, $wgSlackRoomName, $wgSlackSendMethod, $wgExcludedPermission, $wgSitename, $wgSlackEmoji, $wgHTTPProxy;
...
curl_setopt($h, CURLOPT_PROXY, $wgHTTPProxy);

Where did you define the $wgHTTPProxy parameter? Did you set it up in the localSettings file? I could add this optional parameter to the plugin as an additional parameter for others with proxy to get it working.

Thank you for your reply! Yes i had to define it in LocalSettings.php.

BTW, I also had to set the option below or mediawiki gave "unknown error" when saving.
curl_setopt($h, CURLOPT_RETURNTRANSFER, true);

I'm not sure if this has anything to do with using a proxy though.

OK – I've added support for this in the latest push. Can you confirm that it's working? :)

I've also added information on bottom of the README file on how to add the proxy.

Seems to work just fine, thnx!