修改文件Controller-Service-PACserver.cs
1、
//PacUrl = $"http://127.0.0.1:{config.localPort}/pac?t={GetTimestamp(DateTime.Now)}{PacSecret}";
PacUrl = $"http://127.0.0.1:{config.localPort}/pac";
2、
foreach (string line in lines)
{
string[] kv = line.Split(new char[] { ':' }, 2);
if (kv.Length == 2)
{
if (kv[0] == "Host")
{
if (kv[1].Trim() == ((IPEndPoint)socket.LocalEndPoint).ToString())
{
hostMatch = true;
}
}
//else if (kv[0] == "User-Agent")
//{
// // we need to drop connections when changing servers
// if (kv[1].IndexOf("Chrome") >= 0)
// {
// useSocks = true;
// }
//}
}
//匹配验证,直接将pathMatch和secretMatch置为true
//else if (kv.Length == 1)
//{
// if (line.IndexOf("pac", StringComparison.Ordinal) >= 0)
// {
// pathMatch = true;
// }
// if (!secretMatch)
// {
// if(line.IndexOf(PacSecret, StringComparison.Ordinal) >= 0)
// {
// secretMatch = true;
// }
// }
//}
}
pathMatch = true;
secretMatch = true;