mirror of
https://github.com/lampame/lampac-ukraine.git
synced 2026-04-16 17:32:20 +00:00
Add proxy support
This commit is contained in:
parent
7a211c838b
commit
84a3466e5e
@ -42,6 +42,7 @@ namespace AnimeON
|
||||
return null;
|
||||
|
||||
string searchUrl = $"{_init.host}/api/anime/search?text={System.Web.HttpUtility.UrlEncode(query)}";
|
||||
_onLog($"AnimeON: using proxy {_proxyManager.CurrentProxyIp} for {searchUrl}");
|
||||
string searchJson = await Http.Get(searchUrl, headers: headers, proxy: _proxyManager.Get());
|
||||
if (string.IsNullOrEmpty(searchJson))
|
||||
return null;
|
||||
@ -86,6 +87,7 @@ namespace AnimeON
|
||||
public async Task<List<FundubModel>> GetFundubs(int animeId)
|
||||
{
|
||||
string fundubsUrl = $"{_init.host}/api/player/fundubs/{animeId}";
|
||||
_onLog($"AnimeON: using proxy {_proxyManager.CurrentProxyIp} for {fundubsUrl}");
|
||||
string fundubsJson = await Http.Get(fundubsUrl, headers: new List<HeadersModel>() { new HeadersModel("User-Agent", "Mozilla/5.0"), new HeadersModel("Referer", _init.host) }, proxy: _proxyManager.Get());
|
||||
if (string.IsNullOrEmpty(fundubsJson))
|
||||
return null;
|
||||
@ -97,6 +99,7 @@ namespace AnimeON
|
||||
public async Task<EpisodeModel> GetEpisodes(int animeId, int playerId, int fundubId)
|
||||
{
|
||||
string episodesUrl = $"{_init.host}/api/player/episodes/{animeId}?take=100&skip=-1&playerId={playerId}&fundubId={fundubId}";
|
||||
_onLog($"AnimeON: using proxy {_proxyManager.CurrentProxyIp} for {episodesUrl}");
|
||||
string episodesJson = await Http.Get(episodesUrl, headers: new List<HeadersModel>() { new HeadersModel("User-Agent", "Mozilla/5.0"), new HeadersModel("Referer", _init.host) }, proxy: _proxyManager.Get());
|
||||
if (string.IsNullOrEmpty(episodesJson))
|
||||
return null;
|
||||
@ -115,6 +118,7 @@ namespace AnimeON
|
||||
new HeadersModel("Referer", "https://animeon.club/")
|
||||
};
|
||||
|
||||
_onLog($"AnimeON: using proxy {_proxyManager.CurrentProxyIp} for {requestUrl}");
|
||||
string html = await Http.Get(requestUrl, headers: headers, proxy: _proxyManager.Get());
|
||||
if (string.IsNullOrEmpty(html))
|
||||
return null;
|
||||
|
||||
@ -13,9 +13,16 @@ namespace AnimeON
|
||||
/// </summary>
|
||||
public static void loaded(InitspaceModel initspace)
|
||||
{
|
||||
AnimeON = new OnlinesSettings("AnimeON", "https://animeon.club", streamproxy: false)
|
||||
AnimeON = new OnlinesSettings("AnimeON", "https://animeon.club", streamproxy: false, useproxy: false)
|
||||
{
|
||||
displayname = "🇯🇵 AnimeON"
|
||||
displayname = "🇯🇵 AnimeON",
|
||||
proxy = new Shared.Models.Base.ProxySettings()
|
||||
{
|
||||
useAuth = true,
|
||||
username = "",
|
||||
password = "",
|
||||
list = new string[] { "socks5://ip:port" }
|
||||
}
|
||||
};
|
||||
|
||||
// Виводити "уточнити пошук"
|
||||
|
||||
@ -13,9 +13,16 @@ namespace CikavaIdeya
|
||||
/// </summary>
|
||||
public static void loaded(InitspaceModel initspace)
|
||||
{
|
||||
CikavaIdeya = new OnlinesSettings("CikavaIdeya", "https://cikava-ideya.top", streamproxy: false)
|
||||
CikavaIdeya = new OnlinesSettings("CikavaIdeya", "https://cikava-ideya.top", streamproxy: false, useproxy: false)
|
||||
{
|
||||
displayname = "ЦікаваІдея"
|
||||
displayname = "ЦікаваІдея",
|
||||
proxy = new Shared.Models.Base.ProxySettings()
|
||||
{
|
||||
useAuth = true,
|
||||
username = "a",
|
||||
password = "a",
|
||||
list = new string[] { "socks5://IP:PORT" }
|
||||
}
|
||||
};
|
||||
|
||||
// Виводити "уточнити пошук"
|
||||
|
||||
@ -13,9 +13,16 @@ namespace Uaflix
|
||||
/// </summary>
|
||||
public static void loaded(InitspaceModel initspace)
|
||||
{
|
||||
UaFlix = new OnlinesSettings("Uaflix", "https://uafix.net", streamproxy: false)
|
||||
UaFlix = new OnlinesSettings("Uaflix", "https://uafix.net", streamproxy: false, useproxy: false)
|
||||
{
|
||||
displayname = "🇺🇦 UaFlix"
|
||||
displayname = "🇺🇦 UaFlix",
|
||||
proxy = new Shared.Models.Base.ProxySettings()
|
||||
{
|
||||
useAuth = true,
|
||||
username = "a",
|
||||
password = "a",
|
||||
list = new string[] { "socks5://IP:PORT" }
|
||||
}
|
||||
};
|
||||
|
||||
// Виводити "уточнити пошук"
|
||||
|
||||
@ -13,9 +13,16 @@ namespace Unimay
|
||||
/// </summary>
|
||||
public static void loaded(InitspaceModel initspace)
|
||||
{
|
||||
Unimay = new OnlinesSettings("Unimay", "https://api.unimay.media/v1", streamproxy: false)
|
||||
Unimay = new OnlinesSettings("Unimay", "https://api.unimay.media/v1", streamproxy: false, useproxy: false)
|
||||
{
|
||||
displayname = "Unimay"
|
||||
displayname = "Unimay",
|
||||
proxy = new Shared.Models.Base.ProxySettings()
|
||||
{
|
||||
useAuth = true,
|
||||
username = "a",
|
||||
password = "a",
|
||||
list = new string[] { "socks5://IP:PORT" }
|
||||
}
|
||||
};
|
||||
|
||||
// Виводити "уточнити пошук"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user