views:

50

answers:

0

I've got a hardware internet radio player which needs to play a stream which is behind an http auth (standard 401 request).

Unfortunately, the device can't cope with http auth, you can't build the username and password into the link (eg: username:password@http etc - and besides, the server won't accept that) and it plays streams by calling an xml playlist first, which is also behind the barrier. Fortunately, the http auth request is not ssl, which might make things easier.

What the device CAN do, however, is variables within the url. ie: http://my.com/play?123

Rather than pointing directly to the password protected audio server, I thought about bouncing the request off my webhosting Apache/php server and using some kind of redirect (.htaccess with php?) to check the variable against a lookup table of username and password, then somehow think that it was the radio which was authorised.

The problem is, the radio is one IP address, my server is another address (and I don't have root access so no httpd.conf tweaks), and the media server (which I have no control over) is another address.

I started here: http://stackoverflow.com/questions/1726868/proxy-authentication-http-html-details read this http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html found this http://stackoverflow.com/questions/724599/setting-up-an-apache-proxy-with-authentication

and went quietly mad. Is this something that might even be possible? Thanks.