优化下载
This commit is contained in:
parent
e26ca8bf42
commit
f873cbc2dd
|
@ -11,12 +11,15 @@ namespace N_m3u8DL_RE.Common.Util
|
||||||
{
|
{
|
||||||
AllowAutoRedirect = false,
|
AllowAutoRedirect = false,
|
||||||
AutomaticDecompression = DecompressionMethods.All,
|
AutomaticDecompression = DecompressionMethods.All,
|
||||||
ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true
|
ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true,
|
||||||
|
MaxConnectionsPerServer = 1024,
|
||||||
};
|
};
|
||||||
|
|
||||||
public static readonly HttpClient AppHttpClient = new(HttpClientHandler)
|
public static readonly HttpClient AppHttpClient = new(HttpClientHandler)
|
||||||
{
|
{
|
||||||
Timeout = TimeSpan.FromSeconds(100)
|
Timeout = TimeSpan.FromSeconds(100),
|
||||||
|
DefaultRequestVersion = HttpVersion.Version20,
|
||||||
|
DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher,
|
||||||
};
|
};
|
||||||
|
|
||||||
private static async Task<HttpResponseMessage> DoGetAsync(string url, Dictionary<string, string>? headers = null)
|
private static async Task<HttpResponseMessage> DoGetAsync(string url, Dictionary<string, string>? headers = null)
|
||||||
|
|
Loading…
Reference in New Issue