mirror of
https://github.com/netchx/netch.git
synced 2026-05-07 22:44:03 +08:00
fix: hardcode tls SecurityProtocol tls1.2 and tls 1.3
This commit is contained in:
@@ -8,6 +8,11 @@ namespace Netch.Utils
|
||||
{
|
||||
public static class WebUtil
|
||||
{
|
||||
static WebUtil()
|
||||
{
|
||||
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;
|
||||
}
|
||||
|
||||
public const string DefaultUserAgent =
|
||||
@"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user