proxy multicast stream over apache proxy with authentication

i configured an proxy for multicast to http

this you need for example for proxying traffic form Telekom home entertainment

wget https://freefr.dl.sourceforge.net/project/udpxy/udpxy/Chipmunk-1.0/udpxy.1.0.23-0-prod.tar.gz
tar -xzvf udpxy.1.0.23-0-prod.tar.gz
make
make install

add to crontab

1 1 * * * root udpxy -p 4022

initial creation for authentication

htpasswd -c /etc/apache2/.htpasswd sammy

add an addtional user

htpasswd /etc/apache2/.htpasswd sammy2

add to vhost

        <Location /udp>
                ProxyPass http://localhost:4022/udp
                ProxyPassReverse http://localhost:4022/udp
                AuthType Basic
                AuthName "Password Required"
                AuthUserFile /etc/apache2/.htpasswd
                Require valid-user
                Order deny,allow
                Allow from all
        </Location>

enable mod’s on apache if not already done

a2enmod proxy proxy_http

modify the channel list like for telekom

#EXTM3U
#EXTINF:-1,(05) RTL
https://user:password@server/udp/239.35.20.10:10000

#EXTINF:-1,(06) RTL2
https://user:password@server/udp/239.35.20.22:10000

#EXTINF:-1,(07) RTLplus
https://user:password@server/udp/239.35.20.57:10000

#EXTINF:-1,(08) Pro7
https://user:password@server/udp/239.35.20.21:10000

#EXTINF:-1,(09) Kabel1
https://user:password@server/udp/239.35.20.38:10000

#EXTINF:-1,(10) Vox
https://user:password@server/udp/239.35.20.11:10000

#EXTINF:-1,(11) Super RTL
https://user:password@server/udp/239.35.20.39:10000

#EXTINF:-1,(12) ntv
https://user:password@server/udp/239.35.20.47:10000

#EXTINF:-1,(13) Sixx
https://user:password@server/udp/239.35.20.9:10000

#EXTINF:-1,(14) Pro7maxx
https://user:password@server/udp/239.35.20.33:10000

#EXTINF:-1,(15) RTLNITRO
https://user:password@server/udp/239.35.20.59:10000

#EXTINF:-1,(16) arte
https://user:password@server/udp/239.35.10.20:10000

#EXTINF:-1,(17) Phoenix
https://user:password@server/udp/239.35.10.22:10000

#EXTINF:-1,(18) 3sat
https://user:password@server/udp/239.35.10.6:10000

#EXTINF:-1,(19) KI.KA
https://user:password@server/udp/239.35.10.19:10000

#EXTINF:-1,(20) tagesschau24
https://user:password@server/udp/239.35.10.25:10000

#EXTINF:-1,(21) Einsfestival
https://user:password@server/udp/239.35.10.21:10000

#EXTINF:-1,(22) EinsPlus
https://user:password@server/udp/239.35.10.26:10000

#EXTINF:-1,(23) ARD-alpha
https://user:password@server/udp/239.35.10.24:10000

#EXTINF:-1,(24) ZDF Kultur
https://user:password@server/udp/239.35.10.23:10000

#EXTINF:-1,(25) ZDF Infokanal
https://user:password@server/udp/239.35.10.28:10000

#EXTINF:-1,(26) ZDF neo
https://user:password@server/udp/239.35.10.27:10000

#EXTINF:-1,(27) Deutsche Welle
https://user:password@server/udp/239.35.20.44:10000

#EXTINF:-1,(28) BR Nord
https://user:password@server/udp/239.35.10.13:10000

#EXTINF:-1,(29) hr-Fernsehen
https://user:password@server/udp/239.35.10.8:10000

#EXTINF:-1,(30) MDR Sachsen
https://user:password@server/udp/239.35.10.9:10000

#EXTINF:-1,(31) NDR
https://user:password@server/udp/239.35.10.10:10000

#EXTINF:-1,(32) Radio Bremen TV
https://user:password@server/udp/239.35.10.12:10000

#EXTINF:-1,(33) rbb Berlin
https://user:password@server/udp/239.35.10.14:10000

#EXTINF:-1,(34) SR Fernsehen
https://user:password@server/udp/239.35.10.15:10000

#EXTINF:-1,(35) SWR Fernsehen BW
https://user:password@server/udp/239.35.10.16:10000

#EXTINF:-1,(36) WDR
https://user:password@server/udp/239.35.10.18:10000

#EXTINF:-1,(37) Das Erste HD
https://user:password@server/udp/239.35.10.1:10000

#EXTINF:-1,(38) ZDF HD
https://user:password@server/udp/239.35.10.2:10000

#EXTINF:-1,(39) ARTE HD
https://user:password@server/udp/239.35.10.3:10000

#EXTINF:-1,(40) Phoenix HD
https://user:password@server/udp/239.35.10.48:10000

#EXTINF:-1,(41) KiKA HD
https://user:password@server/udp/239.35.10.11:10000

#EXTINF:-1,(42) 3sat HD
https://user:password@server/udp/239.35.10.47:10000

#EXTINF:-1,(43) Tagesschau 24 HD
https://user:password@server/udp/239.35.10.63:10000

#EXTINF:-1,(44) Einsfestival HD
https://user:password@server/udp/239.35.10.58:10000

#EXTINF:-1,(45) EinsPlus HD
https://user:password@server/udp/239.35.10.59:10000

#EXTINF:-1,(46) ZDF Kultur HD
https://user:password@server/udp/239.35.10.54:10000

#EXTINF:-1,(47) ZDF neo HD
https://user:password@server/udp/239.35.10.55:10000

#EXTINF:-1,(48) ZDF Infokanal HD
https://user:password@server/udp/239.35.10.56:10000

#EXTINF:-1,(49) Bayern Süd HD
https://user:password@server/udp/239.35.10.49:10000

#EXTINF:-1,(50) HR HD
https://user:password@server/udp/239.35.10.60:10000

#EXTINF:-1,(51) MDR HD
https://user:password@server/udp/239.35.10.61:10000

#EXTINF:-1,(52) NDR HD
https://user:password@server/udp/239.35.10.50:10000

#EXTINF:-1,(53) RBB HD
https://user:password@server/udp/239.35.10.62:10000

#EXTINF:-1,(54) SWR BW HD
https://user:password@server/udp/239.35.10.51:10000

#EXTINF:-1,(55) WDR HD
https://user:password@server/udp/239.35.10.53:10000

#EXTINF:-1,(56) SR HD
https://user:password@server/udp/239.35.10.64:10000

#EXTINF:-1,(01) Das Erste
https://user:password@server/udp/239.35.10.4:10000

#EXTINF:-1,(02) ZDF
https://user:password@server/udp/239.35.10.5:10000

#EXTINF:-1,(03) Sat 1
https://user:password@server/udp/239.35.20.20:10000

#EXTINF:-1,(04) SAT1 Gold
https://user:password@server/udp/239.35.20.24:10000