FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix UDPxy rewrite for multicast UDP/RTP streams by vfreex · Pull Request #660 · Threadfin/Threadfin · GitHub

Repository navigation

Fix UDPxy rewrite for multicast UDP/RTP streams - #660

Open
vfreex wants to merge 1 commit into
Threadfin:mainfrom
vfreex:fix-udpxy-multicast-rewrite
Open

vfreex wants to merge 1 commit into
Threadfin:mainfrom
vfreex:fix-udpxy-multicast-rewrite

Conversation

vfreex commented Jun 18, 2026

Copy link
Copy Markdown

Summary

Fixes UDPxy stream URL rewriting so multicast streams are detected by parsing the stream URL instead of only matching the udp://@ prefix.

Previously, Threadfin only rewrote URLs beginning with udp://@. That missed valid multicast RTP URLs such as rtp://239.3.1.54:4120, causing /stream/... to redirect clients back to the original multicast URL even when Settings > UDPxy address was configured.

What changed

  • Rewrites multicast streams for both udp and rtp schemes.
  • Parses the stream host and only rewrites when it is an IP multicast address.
  • Leaves hostnames, unicast IPs, and non-UDP/RTP streams unchanged.
  • Supports IPv4 multicast and bracketed IPv6 multicast addresses.
  • Allows UDPxy address to be either host:port, http://host:port, or https://host:port.
  • Keeps the legacy host:port behavior by defaulting it to http://host:port.
  • Updates the settings text to document the accepted UDPxy address forms.
  • Adds unit tests for UDP/RTP, IPv4/IPv6 multicast, unicast, hostnames, and HTTP/HTTPS UDPxy base URLs.

msd_lite compatibility

This also makes Threadfin work with msd_lite in UDPxy-compatible mode. msd_lite supports UDPxy-style /udp/ and /rtp/ request paths and adds IPv6 multicast support. With this change, Threadfin can generate compatible URLs such as:

rtp://239.3.1.54:4120
-> http://<udpxy>/rtp/239.3.1.54:4120/

rtp://[ff15::1]:4120
-> http://<udpxy>/rtp/[ff15::1]:4120/

If the configured UDPxy/msd_lite endpoint uses HTTPS, Threadfin now preserves that scheme:

https://<msd_lite>/rtp/[ff15::1]:4120/

Verification

env GOCACHE=/private/tmp/threadfin-go-build GOMODCACHE=/private/tmp/threadfin-go-mod go test -mod=readonly ./...

vfreex force-pushed the fix-udpxy-multicast-rewrite branch from dd20a81 to e6cfe85 Compare June 18, 2026 16:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL