Faced the problem of firmware on your router. I did not want to work stably. In the end, having tried a bunch of different firmware, I stopped at OpenWRT. For those who want to install follow
here .
So I got distracted. My provider provides access to IPTV, so occasionally at work I turn myself on some of the TV shows. Switching to this firmware, I noticed that there is no standard UDP-HTTP setting in it. Therefore, I began to dig a Runet for something that would help me in this situation. As a result, I came across the
Silver_Clash article
“Setting up IPTV in OpenWRT” , but I couldn’t do anything using the described method. Taking time off until 5 in the morning and finding the cherished lines in the comments, I launched it. Now I want to share instructions with readers.
First of all, we go to your router via ssh as root user. All settings will be made from the console.
Install udpxy:
')
opkg update opkg install udpxy
After a successful installation, check that udpxy starts:
/usr/bin/udpxy
If everything is in order, the command will display the udpxy version and its main options.
Let's proceed, in fact, to the setting (it was more convenient for me to work with files on the router through the graphical interface of the WinSCP application). Open the udpxy settings file (as it will be more convenient for you, but I will write for those who work in putty):
vi /etc/config/udpxy
* if a new version is installed, the option of changing the name of the settings file is possible, then the command will look like this:
vi /etc/config/udpxy-opkg
*
Most likely, you will see something like this:
config udpxy option verbose '0' option status '1'
Here you need to change (or leave as is) the port on which udpxy will spin.
Changed? Then we go further.
Run the encoder with the command:
/etc/init.d/udpxy start
You can check whether udpxy started with the command:
ps |grep udpxy
If you see only one line in the result, go back to the settings and check what you did wrong. If everything is correct, you will see something like:
2035 root 844 S /usr/bin/udpxy -T -p 4022 -S 2158 root 1476 S grep udpxy
You can open the page
192.168.1.1 : 4022 / status in your browser to check that everything works.
Now you need to register our startup script to autoload.
/etc/init.d/udpxy enable
Now you need to configure the firewall for udp traffic:
config rule option src 'wan' option proto 'igmp' option target 'ACCEPT' config rule option src 'wan' option proto 'udp' option dest_ip '224.0.0.0/4' option target 'ACCEPT'
These rules are added to / etc / config / firewall, then restart the service:
/etc/init.d/firewall restart
There is another problem when there is no prescribed route for multicast (I had this moment critical).
Then add this static route to cron:
@daily route add -net 224.0.0.0/4 dev eth0.2 metric 1
And for reliability we write in ssh:
route add -net 224.0.0.0/4 dev eth0.2 metric 1
eth0.2 is the interface to which the wan port is attached.
Now you can restart the router itself to make sure that all the necessary services are running, and everything works exactly as we intended.
We take the list of channels from the provider and convert all the links as described in the manual to udpxy:
http: // {address}: {port} / {protocol} / {channel_addr}: {channel_port}
That is, if you have indicated in the channel list:
udp://@239.77.0.93:1234
So the output should be:
http://192.168.1.1:4022/udp/239.77.0.93:1234
Thanks for attention.