[GH-ISSUE #877] fsockopen in SocketHandler/SlackHandler with proxy #346

Closed
opened 2026-03-04 02:14:18 +03:00 by kerem · 2 comments
Owner

Originally created by @mg-totemic on GitHub (Nov 2, 2016).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/877

Hi,

Recently I wanted to implement the 'SlackHandler' to log critical error messages to Slack, however I've come across an issue as I'm behind a proxy.

There doesn't seem to be any way to configure this handler to use a proxy as it uses fsockopen and there's no way to pass it any options or anything.

Any advice/thoughts would be appreciated.

Thanks

Originally created by @mg-totemic on GitHub (Nov 2, 2016). Original GitHub issue: https://github.com/Seldaek/monolog/issues/877 Hi, Recently I wanted to implement the 'SlackHandler' to log critical error messages to Slack, however I've come across an issue as I'm behind a proxy. There doesn't seem to be any way to configure this handler to use a proxy as it uses fsockopen and there's no way to pass it any options or anything. Any advice/thoughts would be appreciated. Thanks
kerem 2026-03-04 02:14:18 +03:00
  • closed this issue
  • added the
    Feature
    label
Author
Owner

@Seldaek commented on GitHub (Nov 13, 2016):

That is indeed something we do not support, although it's an issue across the board really.. Should be considered for 2.0.

<!-- gh-comment-id:260203137 --> @Seldaek commented on GitHub (Nov 13, 2016): That is indeed something we do not support, although it's an issue across the board really.. Should be considered for 2.0.
Author
Owner

@lightswitch05 commented on GitHub (Feb 28, 2019):

libcurl supports proxy configurations via environment variables such as https_proxy. Full documentation: https://curl.haxx.se/libcurl/c/libcurl-env.html

The one catch is that SlackHandler does not use curl, but SlackWebhookHandler does. So, in a way this ticket could be implemented by using curl everywhere and allowing proxies to be managed through its existing functionality

<!-- gh-comment-id:468369410 --> @lightswitch05 commented on GitHub (Feb 28, 2019): libcurl supports proxy configurations via environment variables such as `https_proxy`. Full documentation: https://curl.haxx.se/libcurl/c/libcurl-env.html The one catch is that `SlackHandler` does not use curl, but `SlackWebhookHandler` does. So, in a way this ticket could be implemented by using curl everywhere and allowing proxies to be managed through its existing functionality
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#346
No description provided.