xiph / Icecast-Server

Icecast streaming media server (Mirror) - Please report bugs at https://gitlab.xiph.org/xiph/icecast-server/issues

Home Page:https://icecast.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add configurable support to respect the "X-Forwarded-For" header for listener metrics

BusterNeece opened this issue · comments

As the developer of a radio webcast management tool, I have been asked by multiple users to implement support for the main branch of Icecast, as opposed to the current support my application has for a custom compiled copy of Icecast-KH.

One of the largest obstacles to switching back to the main Icecast branch is the fact that there exist a number of radio licensing services that offer to proxy a radio connection through their servers, track the traffic and ensure royalties are paid accordingly. Because the traffic arriving at Icecast's doorstep appears to all be from the same IP, however, it's impossible to distinguish the actual listeners in question or their geographic areas.

Karl Heyes had adopted a somewhat novel solution to this problem: specifying a whitelist of IPs that are allowed to send the X-Forwarded-For header as part of their traffic. If the inbound listener has this header and is being proxied from a whitelisted IP, the internally referenced IP is updated to the forwarded address instead, allowing for proper metrics and tracking. Unfortunately, a limitation of this approach is that every IP that will send the header must be known ahead of time, which is impossible if IPs are dynamically assigned (a-la Docker containers) from a broad pool.

If this feature or some facsimile of it were implemented on the main Icecast branch (alongside the SSL improvements that enable LetsEncrypt, see ticket #20) it would far and away be the key to ensuring that several radio services feel comfortable making the switch back to the main branch.

I'm not sure that this Github Issues section is heavily used by the Icecast dev team, but hopefully the feedback gets into the right hands. Thank you for your time!

We're tracking this already as https://trac.xiph.org/ticket/1959 (now locked)
That ticket is now moved to: https://gitlab.xiph.org/xiph/icecast-server/issues/1959
We fully expect this to be in the upcoming 2.5 release.

Please understand that to avoid duplication I'll be closing this ticket to avoid duplication.