mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Send notification using telegram bot api via a reverse proxy #2495
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#2495
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 @skyone-bot on GitHub (Aug 19, 2023).
⚠️ Please verify that this feature request has NOT been suggested before.
🏷️ Feature Request Type
New Notification
🔖 Feature description
I can't access telegram directly. But I built a reverse proxy for telegram bot api.
I think it is possible to provide a configuration option to use a custom endpoint as the telegram bot api endpoint.
For example:
https://api.telegram.org->https://example.com✔️ Solution
Below is the result I expected
❓ Alternatives
Running a forward proxy on the server is not very convenient and can be dangerous in some areas, while it is more convenient and safe to access through a reverse proxy.
I'm not familiar with JavaScript, but I think it should be relatively simple to implement this function.
I hope you can consider it 🙏.
📝 Additional Context
No response
@CommanderStorm commented on GitHub (Aug 19, 2023):
I am not quite sure that this would be an obvious/common enough change for other users.
At least, I have never reverse-proxys used for data-exfiltration from a restrictive network.
I also don't quite get the benefit of going via the reverse-proxy. You are still allowing the requests outside, just via a different url…
I think adding this as a proxy is a better choice.
Using the Proxy configuration for notification providers is tracked here: #616 #3611 #2588
@skyone-bot commented on GitHub (Aug 19, 2023):
@CommanderStorm Thank you for your reply. Below are some additional descriptions.
In case you didn't know, there are parts of the world where using a proxy is against the law. Server providers in those places will even detect what proxy the server is running on. Governments block some websites and allow others.
api.telegram.orgis one of the blocked domain names. e.g. GFWI set up a reverse proxy service to use another domain name to access telegram to solve this problem. This kind of reverse proxy can be implemented very simply through cloudflare worker. This is perhaps more common in my area.
You are right. This kind of reverse proxy is not necessary in the vast majority of the world. I've also found a way to achieve what I want by changing the source code (although this forces me to build the docker image myself). If you think this feature is unnecessary for most users, please close this issue.
Thanks again for making such a useful program 😃
@CommanderStorm commented on GitHub (Aug 20, 2023):
I did not think about that proxy's being used for this, nor did I know that it is against the law.
When thinking about proxys I normally thought about pedantic/assenine network-topology restrictions.
Would using a reverse-proxy not also be against the law? (even though not quite as tracable => unlikely to be problematic)
I would recommend to either use
push-monitor and host uptime-kuma outside the GFW and stick with telegram@skyone-bot commented on GitHub (Aug 20, 2023):
@CommanderStorm . This is really a sad question for us😧. The following answer is not very related to this issue, but I still can't help but write it out.
I have solved this problem by applying a patch, I will close this issue. Thanks again 😉.
Be aware that every user you meet on GitHub in our region violates this law in one way or another. Proxies are very important to developers in our region. It is not only Telegram and GitHub that are interfered and blocked, but also npm, go, maven, docker hub...
The government seems intent on relaxing the law on this kind of behavior. Maybe the developers like me are still useful now 😢.
Unfortunately, WeChat and QQ seem to only care about business users. For example, personal use of QQ robots is not supported by Tencent, so it is very unstable. e.g. mirai or oicq.
Running uptime-kuma outside of GFW is indeed a solution. I use it when cornered. 😢
@Wooden-Robot commented on GitHub (Sep 18, 2023):
@skyone-bot you can change the api path in
server/notification-providers/telegram.jsby yourself@junyangfan commented on GitHub (Nov 6, 2023):
I also want this function, how did you solve it? If it doesn’t feel right to modify the telegram.js file directly, thank you.