Preface
In a previous blog post, I discussed home theater solutions, mentioning the use of IPTV program addresses (with .m3u extension) scraped by others online, which can be directly played in iPlayTV. However, these addresses often expire after some time because China Unicom’s IPTV servers periodically update the program streaming URLs, while the address entered on Apple TV remains static and cannot update in time. This article aims to solve this issue.
**Important Notes Before Proceeding:** I use Beijing Unicom broadband, with the **optical modem in bridge mode, the router handling PPPoE, and a soft router R4S connected as a side router**. This tutorial is tailored to this network topology. Other setups, such as "optical modem in bridge mode + R4S as the main router for PPPoE" or "optical modem handling PPPoE + R4S as a side router," may also work, but the key R4S settings might differ slightly from this guide. I recommend researching further to grasp the core principles rather than copying my setup exactly.
Similarly, if your optical modem handles PPPoE directly, you can connect a cable from the modem to a side/main router to convert multicast to unicast. Alternatively, you can play multicast streams directly on supported devices, avoiding the complexity of my method. The approach depends on your home network topology.
This tutorial has only been tested successfully with Beijing Unicom IPTV. Other regions may differ. If you encounter content strongly tied to a specific region, replace it with the appropriate details for your location.
Before making any changes, back up all router and device settings as a precaution.
I use a soft router R4S with two network ports. If your network topology matches mine, ensure your soft router has at least two ports—one to connect to the main router and another to the optical modem.
My home network setup: - Optical modem subnet: 192.168.1.x - Main router subnet: 192.168.5.x - Optical modem IP: 192.168.1.1 - R4S IP: 192.168.5.2 - Main router LAN IP: 192.168.5.1 - Router WAN IP: 192.168.1.2
Verifying Free Access Support
Currently, Beijing Unicom IPTV does not enforce authentication. However, based on my research, some carriers in other regions encrypt or authenticate IPTV, requiring the use of the MAC address from the carrier-provided IPTV box (which handles decryption) to enable playback on any LAN device via a soft router without the box. Implementing this is complex and beyond the scope of this tutorial.
Download VLC in Advance
When using the optical modem in bridge mode with the router handling PPPoE, connecting directly to the modem won’t provide internet access. Therefore, download the VLC media player on your computer beforehand for testing. Download VLC here:
Connecting to the Optical Modem
Connect your computer to the IPTV port of the optical modem using a wired connection (if no IPTV port is found on the modem, it means the modem supports hybrid insertion, meaning the ports are not differentiated between broadband and IPTV—any port will work). Then, in the VLC software:
-
Go to File > Open Network.
-
Click on Open RTP/UDP Stream below.
-
Select RTP for Protocol, Multicast for Mode, and enter
239.3.1.241(orrtp://239.3.1.241—can’t recall which one exactly) for IP Address, and8000for the port.
After clicking Open, if you can see Beijing TV, it means you can enjoy it for free.

Here, `rtp://239.3.1.241:8000` is the multicast address for Beijing TV. This address may change in the future. For the most accurate address, you can go to https://raw.githubusercontent.com/qwerttvv/Beijing-IPTV/master/IPTV-Unicom.m3u` and test any IP address following an rtp path.
Explanation of Basic Concepts
Skip to the next section if you’re not interested in the details.
IPTV
According to Wikipedia’s definition of IPTV:
Internet Protocol Television (abbreviated as IPTV) is a form of broadband television. IPTV is a system that delivers television content via broadband networks, transmitting broadcast programs through the Internet Protocol (IP) to provide digital TV services to subscribers. Since it requires internet access, IPTV service providers often bundle related services such as internet connectivity and IP telephony, also known as "Triple Play" services. As a type of digital television, conventional TVs need a corresponding set-top box to receive channels, which is why providers typically offer video-on-demand services alongside. Although it uses broadband networks and the Internet Protocol, IPTV does not necessarily rely on the public internet—it often transmits via local area networks to ensure quality.
From this, we can see that IPTV is generally a service provided by broadband providers, allowing users to watch TV through it.
Multicast
A technical method for implementing IPTV playback, known as “multicast” in English. The exact concept isn’t crucial to grasp, but it’s helpful to understand its advantages over unicast:
Advantages include:
-
Does not consume internet bandwidth.
-
The IPTV box serves as an authentication device. Since IPTV operators broadcast to a group, the load on their servers is relatively light.
Disadvantages include:
- Must be connected via cable to the IPTV port of the optical modem (some modems support mixed ports, meaning they don’t distinguish between IPTV and broadband ports). This restricts usage to devices connected to the IPTV box, preventing WiFi-enabled devices from watching network TV.
Unicast
An older technical method for implementing IPTV playback, used when IPTV had fewer users. Compared to multicast, its disadvantages are the other’s advantages, and vice versa:
Advantages include:
- Once connected, the local network supports WiFi, allowing any device to play the stream.
Disadvantages include:
-
Requires a one-to-one connection with the server, increasing server load. Playback may lag when there are many users.
-
Consumes broadband bandwidth, as playback is directly conducted over the internet (similar to watching live streams today).
udpxy
udpxy is **a proxy server that converts UDP streams into HTTP streams**, enabling IPTV streams to be played on various devices.
When multicast addresses cannot be obtained directly, they can be converted to unicast addresses. For example, if the multicast addresses are a:b and d:e (where a and d are IP addresses, and b and e are ports), they can be converted into uniform unicast addresses like z/a/b and z/d/e. The player simply needs to listen to the address z.
M3U
**M3U** (short for MP3 URL) is a file format designed for multimedia playlists. Initially created for audio files like MP3, it is now increasingly used by software to play video file lists.
An M3U file is a plain text file containing all the multicast addresses for playback. By reading this file on an Apple TV or computer, the player can access and stream the video addresses listed within.
EPG
EPG (Electronic Program Guide) contains program schedule information. After obtaining the M3U address in the previous step, which consists of individual IP addresses, how does one identify which channel each IP address corresponds to? This is where EPG comes into play—it pairs each address with program details, including brief channel descriptions. EPG data is typically broadcast alongside the video signal.
Network Topology

Hands-on Practice
Before starting, check if free usage is supported as mentioned at the beginning.
Setting Up a Soft Router
Installing udpxy and luci-udpxy
This step involves standard operations. The UI installation is the most convenient method, as shown in the image (do not enable it immediately after installation; enable it in the final step):

Creating/Configuring Network Interfaces
This step ensures the software router can recognize data coming from the optical modem.
- Under
Network > Interfaces, create a new interface and name it arbitrarily, such asIPTV:

Pay attention to the arrow-marked part—I’ve already created it, so it shows “IPTV” in parentheses (it wasn’t there when first created). Here, eth1 is my LAN port connected to the main router, while eth0 is another interface connected to the optical modem (IPTV port). I modified this earlier—by default, eth0 is the LAN port and eth1 is the WAN port, but that’s irrelevant. This step repurposes the WAN port as the IPTV port.
- Configure the gateway hop and firewall settings for the “IPTV” interface:


- Configure the gateway hop count for the WAN port:

- Configure LAN Port IGMP Snooping:

- Configure network firewall


Configuring the udpxy Service
- Configure as shown in the diagram, noting that eth0 here refers to the WAN port—don’t mix it up:

Finally, attempt to open [http://192.168.5.2:4022/status]([object Object]) to verify whether the udpxy service has started successfully:

Afterwards, change the address rtp://239.3.1.241:8000 that was previously opened with VLC to `http://192.168.2.1:4022/rtp/239.3.1.241:8000`` and try opening it again (no need to click the “Open RTP/UDP Stream” below; just open it directly in the URL).

Then simply double-click to play:

Using Playback Software
I watch TV on Apple TV 4K and have tried several playback apps. Here’s a brief overview:
-
iPlayTV couldn’t play the streams—no idea why.
-
Fileball allowed channel switching up and down, but crashed immediately when selecting a channel.
-
Eventually, I chose “TV+” by the same developer as IIVA, priced at 38 HKD in the Hong Kong region (awkwardly, it went free the day after I bought it).
How to Automatically Update Addresses
The playback addresses for China Unicom’s IPTV change periodically—sometimes the port changes, sometimes the IP address. When this happens, the playback method stops working. So, what’s the solution?
Some kind folks online have performed complex monitoring operations, such as this:
They captured the communication data between the IPTV set-top box and China Unicom’s servers, extracting the addresses. Thus, we can directly use them, such as:
However, there’s one key point here: your home’s soft router address needs to match this kind person’s address (192.168.123.1), and then change the udpxy port to 23234. This way, you can directly input this address into TV+:
Otherwise, you’ll have to actively monitor changes to this file and update accordingly.
Here, I spent ten minutes deploying an API service on Vercel while also enabling Vercel’s Cron Jobs service to periodically execute functions for detecting changes. The code is as follows—you can deploy your own setup as well:
1 | |
Corn Jobs Service Configuration:
1 | |
After pulling this file, if there are updates, the gist file will be automatically updated:
In this way, I only need to hardcode this gist address in TV+, and it will automatically update when the author updates the address.
Reference Links
-
Previous
Settings to Make VSCode More Efficient – From a Front-End Development Perspective -
Next
TeslaMate User Guide

I often wish that when facing some key decisions in life, someone could tell me the best course of action so that I would not waste my precious time. Putting myself in others' shoes, I therefore write blogs often, hoping to record in this tiny corner of the vast Internet the once-in-a-lifetime experiences that matter to me, and to help those who seek help.