Send notification using telegram bot api via a reverse proxy #2495

Closed
opened 2026-02-28 02:56:43 -05:00 by deekerman · 6 comments
Owner

Originally created by @skyone-bot on GitHub (Aug 19, 2023).

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find similar feature request

🏷️ 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

image

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

Originally created by @skyone-bot on GitHub (Aug 19, 2023). ### ⚠️ Please verify that this feature request has NOT been suggested before. - [X] I checked and didn't find similar feature request ### 🏷️ 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 ![image](https://github.com/louislam/uptime-kuma/assets/73385177/a151db4e-3cf6-4cdc-90f5-020d68f1f836) ### ❓ 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_
deekerman 2026-02-28 02:56:43 -05:00
Author
Owner

@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

@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
Author
Owner

@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.org is one of the blocked domain names. e.g. GFW

I 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 😃

@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.org` is one of the blocked domain names. [e.g. GFW](https://en.wikipedia.org/wiki/Great_Firewall) I 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 😃
Author
Owner

@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

  • a chinese notification-provider (Wechat/...) on your side of the firewall or
  • to use the push-monitor and host uptime-kuma outside the GFW and stick with telegram
@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 - a chinese notification-provider (Wechat/...) on your side of the firewall or - to use the `push`-monitor and host uptime-kuma outside the GFW and stick with telegram
Author
Owner

@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 😉.


Would using a reverse-proxy not also be against the law?

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 😢.

a chinese notification-provider (Wechat/...) on your side of the firewall or

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.

to use the push-monitor and host uptime-kuma outside the GFW and stick with telegram

Running uptime-kuma outside of GFW is indeed a solution. I use it when cornered. 😢

@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 😉. ---- > Would using a reverse-proxy not also be against the law? 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 😢. > a chinese notification-provider (Wechat/...) on your side of the firewall or 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](https://github.com/mamoe/mirai) or [oicq](https://github.com/takayama-lily/oicq). > to use the push-monitor and host uptime-kuma outside the GFW and stick with telegram Running uptime-kuma outside of GFW is indeed a solution. I use it when cornered. 😢
Author
Owner

@Wooden-Robot commented on GitHub (Sep 18, 2023):

@skyone-bot you can change the api path in server/notification-providers/telegram.js by yourself

@Wooden-Robot commented on GitHub (Sep 18, 2023): @skyone-bot you can change the api path in `server/notification-providers/telegram.js` by yourself
Author
Owner

@junyangfan commented on GitHub (Nov 6, 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 😉.

Would using a reverse-proxy not also be against the law?

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 😢.

a chinese notification-provider (Wechat/...) on your side of the firewall or

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.

to use the push-monitor and host uptime-kuma outside the GFW and stick with telegram

Running uptime-kuma outside of GFW is indeed a solution. I use it when cornered. 😢

@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 😉.

Would using a reverse-proxy not also be against the law?

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 😢.

a chinese notification-provider (Wechat/...) on your side of the firewall or

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.

to use the push-monitor and host uptime-kuma outside the GFW and stick with telegram

Running uptime-kuma outside of GFW is indeed a solution. I use it when cornered. 😢

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.

@junyangfan commented on GitHub (Nov 6, 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 😉. > > > Would using a reverse-proxy not also be against the law? > > 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 😢. > > > a chinese notification-provider (Wechat/...) on your side of the firewall or > > 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](https://github.com/mamoe/mirai) or [oicq](https://github.com/takayama-lily/oicq). > > > to use the push-monitor and host uptime-kuma outside the GFW and stick with telegram > > Running uptime-kuma outside of GFW is indeed a solution. I use it when cornered. 😢 > @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 😉. > > > Would using a reverse-proxy not also be against the law? > > 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 😢. > > > a chinese notification-provider (Wechat/...) on your side of the firewall or > > 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](https://github.com/mamoe/mirai) or [oicq](https://github.com/takayama-lily/oicq). > > > to use the push-monitor and host uptime-kuma outside the GFW and stick with telegram > > Running uptime-kuma outside of GFW is indeed a solution. I use it when cornered. 😢 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.
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/uptime-kuma#2495
No description provided.