Patched SHOUTcase DNAS 1.9.8 binaries with Chrome 54+ compatibility

These are patched versions of the SHOUTcast DNAS Server v1.9.8 from http://mirror.lchost.net/download.nullsoft.com/shoutcast/tools/ .

See https://bugs.chromium.org/p/chromium/issues/detail?id=669800 for more info.

These binaries fix streams not being playable by Chrome 54+ due to the response line being "ICY 200 OK\r\n" rather than "HTTP/1.0 200 OK\r\n".

You should NOT use these long-term. These binaries are 10~ years old and are not supported by SHOUTcast and they intend to delist all streams served by 1.9.8 from their directory in the near future.

In fact, SHOUTcast may decide to block these binaries in particular since they're not SHOUTcast official binaries. Only use these to buy you time until you can upgrade to a v2 DNAS server.

Downloads

To apply the fix, just copy these files into your Shoutcast DNAS Server directory, replacing your existing Shoutcast binaries.

On Linux, the .tar files can be extracted with tar -xf whatever.tar

Support

I can't really support these binaries beyond making them available to download, but if you have any questions email me at shoutcast@saynotolinux.com

How the patch works

"Simple" Windows / Linux patched versions

As the name would imply, this version of the fix is very simple.

I truncated the trailing *s in the startup copyright message and put the new HTTP status line in the leftover bytes. Then I changed the code path responsible for sending a music stream to send the HTTP status line instead of `ICY...`.

Unfortunately, switching the response to HTTP/1.0 made the SHOUTcast stream directory refuse to list the stream. It expects SHOUTcast 1.9.8 servers to speak ICY and rejects ones that speak HTTP/1.0.

SHOUTcast directory compatible Linux version

I thought about having the server pretend to be a SHOUTcast DNAS 2.x server, but I figured that would be more likely to get it detected and blocked by SHOUTcast's directory.

Instead, since I didn't have any room in the exising sections to write my own code, I added a new code section and data section to the binary in ELFsh. This had the unfortunate consequence of making the binary 1.3~ MB instead of 100~kb because ELFsh filled the normally empty .bss section with nulls. I didn't feel like manually removing them and fixing the file offsets, since it shouldn't hurt anything.

After that, I added JMP into my code section just before the log line gets printed when someone connects to the stream

If patched code detects that the SHOUTcast Directory Tester connected then it writes the ICY header to the response. Otherwise it writes an HTTP/1.0 header to the response.

I'm not well-versed in patching binaries like this, but I've read some slide decks that suggest non-compliant ELF loaders may ignore the new code section I added. For that reason I'm leaving up the older, "simple" patch as well.

It's a more invasive patch than I would like but it appears to work fine. If you have a better patch, email it to me and I'll put it up :)