View previous topic :: View next topic |
Author |
Message |
JohnnyOh
Joined: 10 Feb 2009 Posts: 50 Location: Germany
|
Posted: Tue Feb 02, 2016 1:45 pm Post subject: Blocking feature |
|
|
Hi,
I have setup an blocking using "listener_add" with <mount> via url.
Unfortunately if someone is blocked, he will be asked for username/password, even when there are no credentials available .
Is there any posssibility to avaoid this username-prompt or to redirect a blocked listener to another file or stream?
I am using Icecast 2.4.0.
Thank you in advance _________________ Icecast 2.4.0 (debian)
and
icecast 2.3.2-kh32 (debian)
shoutcast 1.9.5 (debian) |
|
Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Feb 03, 2016 1:54 am Post subject: |
|
|
In the kh releases, you can return a header in the form of
HTTP 200 OK
icecast-auth-message: 403 some message
That will tell icecast to return a 403 response instead of a 401 response or you can return
HTTP 200 OK
Location: http://google.com
for a 302 response, or if you just want them on a different mountpoint
HTTP 200 OK
Mounpoint: /dummy.html
There is an argument for changing the default action to 403 instead which should be a simple change in the code in xiph and kh releases but whether it is the correct thing to do is a good question.
karl. |
|
Back to top |
|
 |
JohnnyOh
Joined: 10 Feb 2009 Posts: 50 Location: Germany
|
Posted: Wed Feb 03, 2016 7:43 am Post subject: |
|
|
Hi Karl,
thank you for the quick response. I will give it a try.
Do all KH-versions supports this feature? _________________ Icecast 2.4.0 (debian)
and
icecast 2.3.2-kh32 (debian)
shoutcast 1.9.5 (debian) |
|
Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Feb 03, 2016 2:26 pm Post subject: |
|
|
Those 2 features were in 2.3.2-kh32 but obviously a number of fixes have gone in since then
karl. |
|
Back to top |
|
 |
JohnnyOh
Joined: 10 Feb 2009 Posts: 50 Location: Germany
|
Posted: Wed Feb 03, 2016 4:19 pm Post subject: |
|
|
Hi Karl,
thank you for the clarification.
We did some tests and wondered if the refering URL must be a HTML-site? Is it also possible to redirect to an absolute mountpoint (i.e. http://xxxxx.com/test.mp3) ? _________________ Icecast 2.4.0 (debian)
and
icecast 2.3.2-kh32 (debian)
shoutcast 1.9.5 (debian) |
|
Back to top |
|
 |
JohnnyOh
Joined: 10 Feb 2009 Posts: 50 Location: Germany
|
Posted: Wed Feb 03, 2016 5:07 pm Post subject: |
|
|
Hi,
it's me again.
So we sent the auth-url to our service, decide to the client ip, if the client can watch or not.
In case of "not", I reply following Headers with a HTTPStatus 200
[2016-02-03 18:01:35] WARN auth_url/handle_returned_header HEADER income : Server: Apache-Coyote/1.1
[2016-02-03 18:01:35] WARN auth_url/handle_returned_header HEADER income : Mountpoint: /fallbackradio303.mp3
[2016-02-03 18:01:35] WARN auth_url/handle_returned_header HEADER income : Content-Length: 0
[2016-02-03 18:01:35] WARN auth_url/handle_returned_header HEADER income : Date: Wed, 03 Feb 2016 17:02:15 GMT
(have put some debug stuff in the icecast)
Directly after that output the HTTP-Auth Window pops up.
If I reply with
icecast-auth-message: 403 you are not allowed
the popup will not come.
But my preferred solution is the alternativ mountpoint. What am I doing wrong?
My icecast Setup
<mount>
<mount-name>/radio.mp3</mount-name>
<authentication type="url">
<option name="listener_add" value="http://192.168.77.84:8088/iceauth/icecast/auth"/>
<option name="auth_header" value="icecast-auth-user: 1"/>
</authentication>
</mount>
<relay>
<server>192.168.77.40</server>
<port>80</port>
<mount>/alternatestation.mp3</mount>
<local-mount>/fallbackradio303.mp3</local-mount>
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay> _________________ Icecast 2.4.0 (debian)
and
icecast 2.3.2-kh32 (debian)
shoutcast 1.9.5 (debian) |
|
Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Feb 03, 2016 6:28 pm Post subject: |
|
|
Firstly, you don't have to define the auth_header like that, the default works as-is and that looks to be what is missing in the responses
HTTP 200 OK
Mountpoint: /fallbackradio303.mp3
icecast-auth-user: 1
karl |
|
Back to top |
|
 |
|