UDPXY modification
Project homepage
Reason for modification
Udpxy is a great application for converting multicast udp traffic to unicast tcp stream. It have built in webserver status/restart page on same port for connecting to TCP stream. And this is the problem. Anyone who can access stream could access status or restart page. In original version you can disable status or restart page. But you cannot limit the access.
What we try?
We try limit access with nginx as reverse-proxy. It works, but all traffic from udpxy goes through nginx and the performance of system become half. We also try using some iptables rules, but only way how to recognize tcp stream and status page is string based rule in iptables and it is slow too.
Modify the source
Because udpxy is under GPL, we try to modify. We are administrators, not programmers, but we fortunately write (discover, guessed :-) part of code which make what we need..
Download our modification
Using modification
Patch the source with our patch. Then you can set enviroment variable UDPXY_MNGIP. For example:
UDXPY_MNGIP=192.168.1.1 ./udpxy
The status page is accessible only from 192.168.1.1, other IP get 404 status code. URL of stream work for all IP.
If you need some complex rules for accessing this page, use some reverse-proxy as nginx or other and specify rules there. For udpxy allow the ip of your reverse-proxy. This is only for status page. Streaming url will work always for all. If you need limit it, use your firewall.
No guarantee
Our patch could have some hidden problems, use it carefully.