mirror of
https://github.com/lampame/lampac-ukraine.git
synced 2026-04-16 17:32:20 +00:00
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
This commit is contained in:
parent
cc91635a05
commit
011ecb2451
@ -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<HeadersModel> streamHeaders = null;
|
||||
bool forceProxy = false;
|
||||
|
||||
if (streamLink.Contains("ashdi.vip", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
streamHeaders = new List<HeadersModel>()
|
||||
{
|
||||
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))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user