From 09572f8861f40b3d1d4d92bd67a020b72e930961 Mon Sep 17 00:00:00 2001 From: celeron533 Date: Thu, 10 Sep 2020 16:53:50 +0800 Subject: [PATCH] Update UserAgent --- shadowsocks-csharp/Controller/Service/UpdateChecker.cs | 2 +- shadowsocks-csharp/Proxy/HttpProxy.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shadowsocks-csharp/Controller/Service/UpdateChecker.cs b/shadowsocks-csharp/Controller/Service/UpdateChecker.cs index 307806ce..29a888fa 100644 --- a/shadowsocks-csharp/Controller/Service/UpdateChecker.cs +++ b/shadowsocks-csharp/Controller/Service/UpdateChecker.cs @@ -15,7 +15,7 @@ namespace Shadowsocks.Controller private static Logger logger = LogManager.GetCurrentClassLogger(); private const string UpdateURL = "https://api.github.com/repos/shadowsocks/shadowsocks-windows/releases"; - private const string UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"; + private const string UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36"; private Configuration config; public bool NewVersionFound; diff --git a/shadowsocks-csharp/Proxy/HttpProxy.cs b/shadowsocks-csharp/Proxy/HttpProxy.cs index 36827c8c..dd13b779 100644 --- a/shadowsocks-csharp/Proxy/HttpProxy.cs +++ b/shadowsocks-csharp/Proxy/HttpProxy.cs @@ -70,7 +70,7 @@ namespace Shadowsocks.Proxy "CONNECT {0} HTTP/1.1" + HTTP_CRLF + "Host: {0}" + HTTP_CRLF + "Proxy-Connection: keep-alive" + HTTP_CRLF + - "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" + HTTP_CRLF + + "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36" + HTTP_CRLF + "{1}" + // Proxy-Authorization if any "" + HTTP_CRLF; // End with an empty line private const string PROXY_AUTH_TEMPLATE = "Proxy-Authorization: Basic {0}" + HTTP_CRLF;