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 

Post data incomplete during url_auth

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



Joined: 09 Apr 2014
Posts: 34

PostPosted: Thu Apr 10, 2014 8:27 pm    Post subject: Post data incomplete during url_auth Reply with quote

When using the url_auth functionality, Icecast is supposed to post some client information like the ip-address and user-agent to the auth url.
This does happen, but the ip-address is missing.

Example <mount> section in the main icecast config file:
Code:
<mount>
    <mount-name>/mount.ogg</mount-name>
    <authentication type="url">
        <option name="mount_add" value="http://myauthserver.com/stream_start.php"/>
        <option name="mount_remove" value="http://myauthserver.com/stream_end.php"/>
    </authentication>
</mount>


When a mount connects, the following parameters are posted to http://myauthserver.com/stream_start.php :
Code:
Array
(
    [mount] => /mount.ogg
    [server] => domain.com
    [port] => 8001
    [ip] =>
)


When disconnecting, the following parameters are posted to http://myauthserver.com/stream_end.php:
Code:
Array (
    [mount] => /mount.ogg
    [server] => domain.com
    [port] => 8001
    [ip] =>
)


As you can see the ip-address is not added.
I think this is a bug and it would be nice if this bug can be fixed.

If possible, please also add the user agent to the array.

Tested in versions:
- Icecast 2.3.3-kh7
- Icecast 2.3.3-kh10
Code:
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 Apr 12, 2014 1:13 am    Post subject: Reply with quote

I suppose notionally the IP could be the source client IP or relay IP, useragent would only be present for the source client case and even then may not be provided.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sven



Joined: 09 Apr 2014
Posts: 34

PostPosted: Sat Apr 12, 2014 2:25 pm    Post subject: Reply with quote

Hi Karl,

Thanks for your response.

"I suppose notionally the IP could be the source client IP or relay IP"
Yes.

"useragent would only be present for the source client case and even then may not be provided."
That is Ok. Most of the times I see the useragent in the admin panel (/admin).
I suggest that if the user agent is set in the admin panel, it will also be posted to the url_auth script. If not, the user_agent post will be empty.

Do you think that that these changes will be implement in the near feature?

Best regards,
Sven
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Apr 14, 2014 5:51 pm    Post subject: Reply with quote

Try the github build and let me know if the mount_add is working as expected. I'll expand it to the mount_remove.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sven



Joined: 09 Apr 2014
Posts: 34

PostPosted: Wed Apr 23, 2014 1:32 pm    Post subject: Reply with quote

Just tested it with the github build.
mount_add works perfectly now as you can see here:
Code:
(
    [action] => mount_add
    [mount] => /mount.ogg
    [server] => domain.com
    [port] => 8001
    [ip] => 192.168.1.14
    [agent] => Native Instruments IceCast Uplink
)


I see the user agent is also added which makes it even better Smile

Any idea when you have time to add this to the stable version?

Thanks for you quick help btw,
really appreciate it!
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 -> Bug Reports 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