Enjoying some Real Audio on a working Friday

Enjoying some Real Audio on a working Friday

I’ve some previous stuff transcoded to Real Audio, as a result of why not? It’s like a magical hidden file-format from years previous.

Granted the streaming software program is so previous, it breaks with NAT, however there was an older playable RAM / playlist file that’d simply pull down .ra’s from an online server, like a snap. Except I by no means may get it to work proper, however I didn’t spend a lot power on it, as a result of who cares?

GET /DSOTM.ram

Well I went for it in the present day, connected some tcpdump after getting the silly ‘error 11’ and yeah, seems that even the three.0 shopper is HTTP 1.0. So meaning it doesn’t use named servers, so you’ll be able to’t actually put it on a contemporary internet server. It’s dangerous sufficient it doesn’t like fashionable cryptography, however that is simply the worst. So I figured I’d simply attempt to do one thing uncooked as I’m additionally kinda irritated that I can’t have good previous HTTP entry to my vpsland archive, since google will penalize you for having HTTP websites/hyperlinks. But a $1 VPS and a $1 area, and I’m in enterprise.

The very first thing I went to do was to setup haproxy to entrance all this, as I like to make use of all types of bizarre backends, like UnixWare, or Windows NT 3.1

+
+frontend http8888
+        bind *:8888
+        mode http
+        http-request set-header Connection "keep-alive" if { req.ver "1.0" }
+        http-request set-header Host "dsotm.rabbitfoxtrot.uk" if { req.ver "1.0" }
+
+        acl dsotm hdr(host) -i dsotm.rabbitfoxtrot.uk:8888
+        acl is_ra path_end .ra .RA
+        acl is_ram path_end .ram .RAM
+        use_backend dsotm if dsotm || is_ra || is_ram
+
+backend dsotm
+        stability leastconn
+        choice httpclose
+        choice forwardfor
+        server local1 127.0.0.1:80 verify inter 500 maxconn 20
a

This diff is for the /and so forth/haproxy/haproxy.conf which merely provides an 8888 entrance finish. I set it so as to add a ‘keep-alive’ & ‘Host’ fields within the header to begin to make it appear a bit proper.

Next it is going to parse out the extension of what information are being retrieved. More magic could be wanted to do a number of RealAudio’s in that completely different paths/timber for certain, however since that is the one one on that entrance finish, simply searching for the .ra/.ram is sufficient. I may additionally connect different websites to that entrance finish, dancing round this, however that’s a bit extra work.

that’ll connect a reputation, on this case dsotm.rabbitfoxtrot.uk, after which shove it to the native Apache server which I’ve moved to the loopback adapter.

Configuring Apache is a little more concerned with all of the shifting components:

ports.conf

--- ports.conf.dist     2025-04-11 17:28:47.627256671 +0000
+++ ports.conf  2025-04-11 17:28:58.374176767 +0000
@@ -2,7 +2,7 @@
 # have to vary the DigitalHost assertion in
 # /and so forth/apache2/sites-enabled/000-default.conf

-Listen 80
+Listen 127.0.0.1:80

 <IfModule ssl_module>
        Listen 443

The complete level is to make Apache hear on the loopback interface, not the general public deal with. This means haproxy will get the requests first so it may possibly alter/direct them as wanted.

The closing half, which mixes the MiME magic, is contained within the sites-availble listing which then in fact is linked to the sites-enabled

<DigitalHost *:80>
        # The ServerName directive units the request scheme, hostname and port that
        # the server makes use of to determine itself. This is used when creating
        # redirection URLs. In the context of digital hosts, the ServerName
        # specifies what hostname should seem within the request's Host: header to
        # match this digital host. For the default digital host (this file) this
        # worth shouldn't be decisive as it's used as a final resort host regardless.
        # However, you could set it for any additional digital host explicitly.
        ServerName dsotm.rabbitfoxtrot.uk

        ServerAdmin [email protected]
        DocumentRoot /srv/www/vpsland/low/DSOTM

        AddType audio/x-pn-realaudio            ram
        AddType audio/x-pn-realaudio-plugin     rpm
        AddType audio/x-realaudio               ra

        # Available loglevels: trace8, ..., trace1, debug, information, discover, warn,
        # error, crit, alert, emerg.
        # It can be doable to configure the loglevel for explicit
        # modules, e.g.
        #LogLevel information ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error/dsotm-error.log
        CustomLog ${APACHE_LOG_DIR}/dsotm-access.log mixed

        # For most configuration information from conf-available/, that are
        # enabled or disabled at a worldwide degree, it's doable to
        # embrace a line for just one explicit digital host. For instance the
        # following line allows the CGI configuration for this host solely
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
    <Directory /srv/www/vpsland/low/DSOTM>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order permit,deny
    permit from all
    Require all granted
    </Directory>
</DigitalHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

So now I can nonetheless host a half dozen different web sites on that Apache server but in addition have that particular ‘entrance door’ entry on port 8888 that’ll take discover of requests for .ra/.ram information and it’ll remodel these into one thing extra HTTP 1.1 which Apache will take pleasure in.

Playing!

And even higher, it really works.

At some level, just like the boxed wine challenge we’ll hit the purpose the place you’ll be able to simply 90’s web 100% within the browser to different browser ‘server’ nodes. It’ll be superior.

HI-FI News

by way of Virtually Fun https://ift.tt/q4Ddr9P

April 11, 2025 at 08:41PM