Browse Source

Update UserAgent

tags/4.2.0.0
celeron533 4 years ago
parent
commit
09572f8861
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      shadowsocks-csharp/Controller/Service/UpdateChecker.cs
  2. +1
    -1
      shadowsocks-csharp/Proxy/HttpProxy.cs

+ 1
- 1
shadowsocks-csharp/Controller/Service/UpdateChecker.cs View File

@@ -15,7 +15,7 @@ namespace Shadowsocks.Controller
private static Logger logger = LogManager.GetCurrentClassLogger(); private static Logger logger = LogManager.GetCurrentClassLogger();
private const string UpdateURL = "https://api.github.com/repos/shadowsocks/shadowsocks-windows/releases"; 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; private Configuration config;
public bool NewVersionFound; public bool NewVersionFound;


+ 1
- 1
shadowsocks-csharp/Proxy/HttpProxy.cs View File

@@ -70,7 +70,7 @@ namespace Shadowsocks.Proxy
"CONNECT {0} HTTP/1.1" + HTTP_CRLF + "CONNECT {0} HTTP/1.1" + HTTP_CRLF +
"Host: {0}" + HTTP_CRLF + "Host: {0}" + HTTP_CRLF +
"Proxy-Connection: keep-alive" + 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 "{1}" + // Proxy-Authorization if any
"" + HTTP_CRLF; // End with an empty line "" + HTTP_CRLF; // End with an empty line
private const string PROXY_AUTH_TEMPLATE = "Proxy-Authorization: Basic {0}" + HTTP_CRLF; private const string PROXY_AUTH_TEMPLATE = "Proxy-Authorization: Basic {0}" + HTTP_CRLF;


Loading…
Cancel
Save