mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Notifications via a proxy (squid) #1763
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#1763
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @canis54 on GitHub (Jan 11, 2023).
⚠️ Please verify that this feature request has NOT been suggested before.
🏷️ Feature Request Type
Other
🔖 Feature description
Telegram (axios.get) and teams (axios.post) use neither the system-wide proxy (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) nor a separately defined one such as in the .npmrc (proxy, https-proxy). The extension of the respective axios calls in teams.js or telegram.js with the proxy address (https://www.npmjs.com/package/axios >
axios#post(url[, data[, config]])) also fails because the request doesn't arrive at the Squid withrequest_method=CONNECT.The webhooks for Telegram and teams via the squid work as desired via curl.
✔️ Solution
The general use of the system variables (
HTTP_PROXY,HTTPS_PROXY,NO_PROXY) for the installation (download-dist.js), the actual monitoring (already works via thehttp-proxy-agentmodule) and the notifications (notification-providers) would make sense.❓ Alternatives
No response
📝 Additional Context
I was able to get the download to run as part of the installation using the 'https-proxy-agent' module in download-dist.js. I couldn't get Axios to work with the Squid.
@tperrindell commented on GitHub (Mar 8, 2023):
Agreed, the Teams channel we have is not getting any notifications because the request ignores the proxy settings.
@koehdaniel commented on GitHub (Mar 8, 2023):
I fixed it by using a different library to do the POST-Request.
My first public Pull-Request on Github so not sure how to proceed.
@tperrindell commented on GitHub (Mar 8, 2023):
How do you setup the proxy value to use in the notification?
@koehdaniel commented on GitHub (Mar 8, 2023):
I set them as Environment-Variables:
@vanhoutenbos commented on GitHub (Jun 22, 2023):
👀 im interested in this feature!
@CommanderStorm commented on GitHub (Jun 22, 2023):
@vanhoutenbos
Please refrain from posting
+1/ requests for updates things on issues, as this makes issue-management harder.Issues are for discussing what needs to be done how by whom.
We use 👍🏻 on issues to prioritise work.
If you want, you can propose a PR fixing this issue.
@garelp commented on GitHub (Aug 16, 2023):
Hello,
That would be good to support either a specific proxy configuration to send notification or having the full support of the proxy variable including the no_proxy too.
@miberecz commented on GitHub (Feb 21, 2024):
Turns out its a big blocker for us. Our servers cannot reach the internet directly, we have to use a proxy (as most enterprise servers)
Since MS Teams webhook addresses are not local, we cannot reach them with the Kuma.
As a workaround I tried to install an Apprise-api container setup our MS Teams endpoint in it, since that one can have proxy set up.
(No, the built-in apprise also does not work since it cannot use proxies)
But now I do not know how to call my Apprise endpoint from Kuma.
http://apprise-address:8000/notify/someID
If I call this as a webhook I get
Any ideas about this?
@CommanderStorm commented on GitHub (Apr 14, 2024):
@canis54 Is this issue a duplciate of #616?
@canis54 commented on GitHub (Apr 19, 2024):
@CommanderStorm Thank you for your inquiry. It appears that I've been rather foolish in my approach prior to submitting the request, as I neglected to thoroughly search through existing inquiries. Essentially, my request aligns closely with those already made. However, my concern extends beyond mere notification via a proxy; rather, I am interested in the general usage of existing proxies, such as during a program update. In my instance, I've simply adjusted the download-dist.js file (which certainly isn't suitable for a pull request, as I'm not a programmer).
@CommanderStorm commented on GitHub (Apr 19, 2024):
Closing as s duplicate then
@CommanderStorm commented on GitHub (Apr 19, 2024):
Provide a PR and we will see about it. Think you are underselling yourself here
@mertcancam commented on GitHub (Jun 27, 2024):
I needed to implement proxy support for the webhook notification provider, and the following changes worked for me.
Server-side (server/notification-providers/webhook.js):
Import:
Then add the following code:
Frontend (src/components/notifications/Webhook.vue):
It seems feasible to add this feature in a more general way rather than individually for each notification provider. I apologize if this comment is not entirely appropriate. As a DevOps engineer, I needed to get this working quickly. I hope someone can take over and integrate this feature into a future release, so I don't have to rely on a custom build. Thank you!
@gbetsis commented on GitHub (Nov 26, 2024):
In case you want to implement proxy support for telegram notifications, here is a quick and dirty solution, with hardcoded the proxy settings into the code:
This is the full code of the file /app/server/notification-providers/telegram.js
@gbetsis commented on GitHub (Nov 26, 2024):
In case you want to use rocket.chat notifications with proxy, here is the full code for the file /app/server/notification-providers/rocket-chat.js:
@jakestec commented on GitHub (Jul 4, 2025):
If anyone else stumbles on this and wants a working/not pretty solution for teams.js here you go:
For what its worth I am doing this in uptime-kuma:2.0.0-beta.3, https-proxy-agent is already installed in the default image.
Its only a couple lines of code:
full file here /app/server/notification-providers/teams.js: