Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

redirects

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
m3gab0y



Joined: 15 Aug 2009
Posts: 47
Location: London, UK

PostPosted: Sat Nov 13, 2010 2:56 pm    Post subject: redirects Reply with quote

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
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sat Nov 13, 2010 9:19 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
m3gab0y



Joined: 15 Aug 2009
Posts: 47
Location: London, UK

PostPosted: Wed Nov 17, 2010 6:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Nov 17, 2010 9:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
gee2803



Joined: 11 Aug 2006
Posts: 48

PostPosted: Fri Dec 03, 2010 9:56 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber