| View previous topic :: View next topic |
| Author |
Message |
m3gab0y
Joined: 15 Aug 2009 Posts: 47 Location: London, UK
|
Posted: Sat Nov 13, 2010 2:56 pm Post subject: redirects |
|
|
just a quick question. Can I setup Icecast to redirect users that wanna connect to a specific mountpoint, to redirect them to a given URL (outside the server).
My idea is to move a client to another server, but the listeners know the old URL pointing to a specific mount - I want to redirect all theese listeners to a new server.
Is this possible and if possible - how? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sat Nov 13, 2010 9:19 pm Post subject: |
|
|
not in 2.3.2, and not trivially in the kh tree (you can use url auth and send back a 200 OK response to icecast with a Location: header that you would use for a 302. With that a 302 response is sent back to the listener.
karl. |
|
| Back to top |
|
 |
m3gab0y
Joined: 15 Aug 2009 Posts: 47 Location: London, UK
|
Posted: Wed Nov 17, 2010 6:48 pm Post subject: |
|
|
| karlH wrote: |
not in 2.3.2, and not trivially in the kh tree (you can use url auth and send back a 200 OK response to icecast with a Location: header that you would use for a 302. With that a 302 response is sent back to the listener.
karl. |
Can you give me some additional info and an example? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Nov 17, 2010 9:24 pm Post subject: |
|
|
You would specify a <mount> block for the old mountpoint reference with an authentication block. That block would specify a listener_add for validating listeners which in this case has a response of a Location: header to the new URL. That Location: header is detected and forces a 302 response to the listener who then reconnects to the correct location.
A php for something like that would be
<?php
header ('Location: http://other.server:800/newmountpoint');
?>
Note that the script returns a normal 200 OK response not 302 because we are not redirecting the icecast to auth link. The idea of this sort of mechanism was to be used as a sort of external load balancer.
karl. |
|
| Back to top |
|
 |
gee2803
Joined: 11 Aug 2006 Posts: 48
|
Posted: Fri Dec 03, 2010 9:56 am Post subject: |
|
|
Hello karl!
*edit*
With your recent branch my first problem is now solved, but there is still no redirection.
I have setup a mountpoint:
| Code: |
<mount>
<mount-name>/mountpoint.mp3</mount-name>
<authentication type="url">
<option name="listener_add" value="http://externalstream.url.com/header.php"/>
</authentication>
</mount> |
The url is working in my player, but if I connect to the mountpoint I still get the music that is streamed there.
Could you give an example or tell me what I am doing wrong?
Thank you very much in advance. |
|
| Back to top |
|
 |
|