karlheyes / icecast-kh

KH branch of icecast
GNU General Public License v2.0
297 stars 105 forks source link

Change listen URL reported to YP? (Needed if proxying or reducing open ports) #417

Closed Moonbase59 closed 1 year ago

Moonbase59 commented 1 year ago

As I mentioned over at AzuraCast in https://github.com/AzuraCast/AzuraCast/issues/6241, many of us nowadays live behind proxies (Nginx, Apache, NPM, etc.) that handle SSL cert generation & updates, and we probably all wish to reduce the number of open ports, or might even be forced to only use 80 or 443.

So I reckon the time of "brute-force-generating" a listen URL by constructing it from the host name, a port, and the mount point name, and using http://, as Icecast does, is a little outdated.

For instance, I use AzuraCast and have a listening URL of (name changed):

https://radio.testradio.net/listen/testradio/radio.mp3

which works great with only port 443 open, and could even be embedded in a https:// website.

Icecast. nevertheless, constructs a listener URL of:

http://radio.testradio.net:8000/radio.mp3

and reports that to dir.xiph.org, the Icecast Yellow Pages.

This would need

It would also

My questions:

I’ve seen lots of different URLs on dir.xiph.org, so there must surely be a way… And I think many stations would benefit from that!

Here are some random examples:

karlheyes commented 1 year ago

I managed to get around to this. I have added a listenurl tag to the mount block to allow for specifying you own url sent to the directory. Obviously the directory will do some level of checking to make sure it matches but tag specifies the url in the info to the directory. It is currently in the master tree if you want to try it immediately, or wait until the next [pre-]release.

karl.

Moonbase59 commented 1 year ago

@karlheyes Wow, thanks for that, much appreciated! Will soon check it out.

karlheyes commented 1 year ago

This is in from kh21.7 update (latest kh21.8 now). Let me know how it works out.

karl

Moonbase59 commented 1 year ago

Hi Karl, sorry, it took a while until kh21.8 was officially integrated into AzuraCast.

I’m very happy to say that using <listenurl>…</listenurl> per mountpoint is working very well so far with

Station and now-playing info as well as the player links work on both, and finally our stations can be correctly listed. Thanks ever so much for implementing this!