binwiederhier / ntfy

Send push notifications to your phone or desktop using PUT/POST
https://ntfy.sh
Apache License 2.0
18.28k stars 716 forks source link

Use DNS SRV records for the default server setting #603

Closed piwi82 closed 1 year ago

piwi82 commented 1 year ago

The Default server setting in the mobile application (Android/iOS) could be eased by using only the domain name (domain.tld) instead of the full URL (https://ntfy.domain.tld) through a DNS SRV record.

Syntax : _ntfy._tcp.domain.tld. ttl IN SRV priority weight port target. Example : _ntfy._tcp.ntfy.sh. 600 IN SRV 0 0 443 ntfy.sh.

Mine would look like : _ntfy._tcp.domain.tld. 86400 IN SRV 0 0 443 ntfy.host.domain.tld.

This way, the user has just to input domain.tld in Settings > GENERAL > Default server (also in Settings > USERS > + Add user > Service URL) and let the applications resolve _ntfy._tcp.domain.tld (and build the URL).

You will probably have to check the port value to determine whether http or https should be used :

No hard work, just happy end users 😀 (#597 is a good one too)

binwiederhier commented 1 year ago

While this is a fascinating idea, I do not see a lot of value in it, especially since the base-url concept is pretty much ingrained into every fiber of ntfy. If anything, this is a UX problem: We could ease the URL entry, or have the Android/iOS/web app probe the URLs automatically.

Most users do not know what a SRV record even is. Many do not have their own DNS server, or control all aspects of it.

I am taking the liberty of closing this as WONT DO. I hope you understand. Please keep other ideas coming. I love seeing ideas like this.

piwi82 commented 6 months ago

I do understand 😉 This one certainly has the lowest priority regarding other requests like links #587 and markdown #1072 on mobile.