View previous topic :: View next topic |
Author |
Message |
sven
Joined: 09 Apr 2014 Posts: 34
|
Posted: Thu Apr 10, 2014 8:27 pm Post subject: Post data incomplete during url_auth |
|
|
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
|
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sat Apr 12, 2014 1:13 am Post subject: |
|
|
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 |
|
|
sven
Joined: 09 Apr 2014 Posts: 34
|
Posted: Sat Apr 12, 2014 2:25 pm Post subject: |
|
|
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 |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Apr 14, 2014 5:51 pm Post subject: |
|
|
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 |
|
|
sven
Joined: 09 Apr 2014 Posts: 34
|
Posted: Wed Apr 23, 2014 1:32 pm Post subject: |
|
|
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
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 |
|
|
|