From 011ecb2451ae79c1e35528cafb4d549f6ba9c472 Mon Sep 17 00:00:00 2001 From: baliasnyifeliks Date: Tue, 13 Jan 2026 11:19:35 +0200 Subject: [PATCH] feat(media): implement provider-specific streaming configuration Introduces dynamic header injection and proxy enforcement for ashdi.vip streams to maintain compatibility with their content delivery requirements. The implementation detects the provider domain and automatically applies necessary HTTP headers alongside mandatory proxy routing. BREAKING CHANGE: HostStreamProxy now accepts optional headers and force_streamproxy parameters to support enhanced streaming configurations --- CikavaIdeya/Controller.cs | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/CikavaIdeya/Controller.cs b/CikavaIdeya/Controller.cs index 41a25d2..6e291ed 100644 --- a/CikavaIdeya/Controller.cs +++ b/CikavaIdeya/Controller.cs @@ -53,8 +53,23 @@ namespace CikavaIdeya.Controllers if (playResult.streams != null && playResult.streams.Count > 0) { - OnLog($"Controller: redirecting to stream URL: {playResult.streams.First().link}"); - return Redirect(HostStreamProxy(init, accsArgs(playResult.streams.First().link))); + string streamLink = playResult.streams.First().link; + List streamHeaders = null; + bool forceProxy = false; + + if (streamLink.Contains("ashdi.vip", StringComparison.OrdinalIgnoreCase)) + { + streamHeaders = new List() + { + new HeadersModel("User-Agent", "Mozilla/5.0"), + new HeadersModel("Referer", "https://ashdi.vip/") + }; + forceProxy = true; + } + + string streamUrl = HostStreamProxy(init, accsArgs(streamLink), headers: streamHeaders, force_streamproxy: forceProxy); + OnLog($"Controller: redirecting to stream URL: {streamUrl}"); + return Redirect(streamUrl); } if (!string.IsNullOrEmpty(playResult.iframe_url)) @@ -381,4 +396,4 @@ namespace CikavaIdeya.Controllers return result; } } -} \ No newline at end of file +}