Skip to content

Fix handle_hls_stream_proxy not honoring TRANSPORT_ROUTES configuration#278

Merged
mhdzumair merged 1 commit into
mhdzumair:mainfrom
spawntty:fix-transport-routes-20260513
May 17, 2026
Merged

Fix handle_hls_stream_proxy not honoring TRANSPORT_ROUTES configuration#278
mhdzumair merged 1 commit into
mhdzumair:mainfrom
spawntty:fix-transport-routes-20260513

Conversation

@spawntty

@spawntty spawntty commented May 13, 2026

Copy link
Copy Markdown
Contributor

handle_hls_stream_proxy was calling create_streamer() with no URL, so the session was built against no route match.
With PROXY_ALL=true this worked incidentally because the default proxy applied to all sessions regardless of URL.
With TRANSPORT_ROUTES-only configuration, the no-URL call returned the default (no proxy), so the manifest request to matched domains bypassed the proxy entirely.

Passing hls_params.destination gives the routing config the URL it needs to match against configured patterns and build the session with the correct connector (e.g. SOCKS5 ProxyConnector).

Summary by CodeRabbit

  • Bug Fixes
    • Improved HLS stream proxy handling by adjusting streamer initialization to properly use destination parameters, ensuring more reliable stream processing.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The HLS stream proxy handler now passes the HLS destination parameter when creating the streamer instance. The create_streamer() call is updated to receive hls_params.destination as an argument, enabling the streamer to initialize with explicit destination information for HLS requests.

Changes

HLS Streamer Initialization

Layer / File(s) Summary
HLS streamer destination parameter
mediaflow_proxy/handlers.py
The handle_hls_stream_proxy function passes hls_params.destination to create_streamer() during streamer initialization, providing the destination context required for HLS streaming.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A rabbit hops through streaming flows,
With destinations now in tow,
The create_streamer takes its aim,
hls_params.destination—what a game!
One line changed, the path is clear,
HLS magic draws near. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title directly describes the main change: fixing handle_hls_stream_proxy to honor TRANSPORT_ROUTES configuration, which matches the core issue and resolution described in the PR objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@spawntty spawntty changed the title Fix handle_hls_stream_proxy not honoring TRANSPORT_ROUTES proxying Fix handle_hls_stream_proxy not honoring TRANSPORT_ROUTES configuration May 13, 2026
@mhdzumair mhdzumair merged commit 6629115 into mhdzumair:main May 17, 2026
2 of 3 checks passed
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.

2 participants