Occasionally I have the chance to use the nice big loudspeakers at the office without anyone being bothered. I have a premium account for my favourite net radio station but have no desire to expose my credentials by placing my playlist on the Windows XP machine to which the loudspeakers are connected. So I wrote a small stream proxy to work around that small problem.
It is quite simple to use:
$ pls-proxy.pl yournetradio.pls
pls-proxy.pl 0.1
Copyright (c) 2008 Christian Laursen <xi@borderworlds.dk>
Playlist contains 3 entries, picking number 2
URL: http://xxxx:yyyyy@iii.iii.iii.iii:80
Waiting for client to connect on port 8020...
Client connected
Connected to iii.iii.iii.iii:80
Headers:
GET / HTTP/1.0
Host: iii.iii.iii.iii:80
User-Agent: MPlayer/1.0rc2-4.2.1
Icy-MetaData: 1
Connection: close
Authorization: Basic xxxxxxxxxxxxxxxxxx
Fri Nov 28 18:43:07 2008 Bytes received: 434176
Fri Nov 28 18:44:07 2008 Bytes received: 1900544
The proxy accepts exactly one connection, so even if you run it on a public machine without firewalling it, as long as you connect first no one else will be able to use your stream.
Get it here and use it if you like.