Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relay notifications from one public server to a private one #1278

Open
schklom opened this issue Feb 18, 2025 · 0 comments
Open

Relay notifications from one public server to a private one #1278

schklom opened this issue Feb 18, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@schklom
Copy link

schklom commented Feb 18, 2025

💡 Idea
I have a self-hosted ntfy instance at my_ntfy_url.domain.
Problem: my URL is unique, so giving it out to the Internet somewhat identifies me.
What I tried and failed: On ntfy.sh, if I subscribe to my_ntfy_url.domain/topic1, my browser (and phone app) connects to my_ntfy_url.domain.
Solution: On my_ntfy_url.domain/topic1, subscribing to ntfy.sh/topic2 should make the notifications received by ntfy.sh/topic2 go to my_ntfy_url.domain/topic1 and then to my device. Similar to https://docs.ntfy.sh/config/#ios-instant-notifications, but also for other client devices, so topic2 would be the sha256 of my_ntfy_url.domain/topic1.

The easy alternative is to connect my devices to both servers, but on a phone this requires battery to maintain 2 Websocket connections.
This feature would let my phone maintain only 1 connection (to my_ntfy_url.domain) instead of 2 (ntfy.sh + my_ntfy_url.domain), and the notification sender would only know about ntfy.sh instead of my_ntfy_url.domain.

If usable with UnifiedPush, this would solve the privacy issue from simplex-chat/simplex-chat#1081 where the self-hosted ntfy server can be used to uniquely identify its owner, because the other party would only post to ntfy.sh/topic2. Ideally, this feature can be used with and without UnifiedPush.

I understand this would add a connection from the server to ntfy.sh, but at the same time this would allow to avoid connections from devices because they would only need to keep a connection to my_ntfy_url.domain instead of my_ntfy_url.domain + ntfy.sh.
In my situation, i have a few phones that would stop connecting to my_ntfy_url.domain + ntfy.sh, and only connect to my_ntfy_url.domain.
So the load on ntfy.sh might decrease a little.

To relay with UnifiedPush, maybe a toggle in the mobile app settings could say "Relay new UnifiedPush subscriptions via the following server: (default ntfy.sh)".

💻 Target components

ntfy server (functionality to relay notifications)

@schklom schklom added the enhancement New feature or request label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant