修改文件Controller-Service-PACserver.cs
1、
1//PacUrl = $"http://127.0.0.1:{config.localPort}/pac?t={GetTimestamp(DateTime.Now)}{PacSecret}"; 2PacUrl = $"http://127.0.0.1:{config.localPort}/pac";
2、
1 foreach (string line in lines) 2 { 3 string[] kv = line.Split(new char[] { ':' }, 2); 4 if (kv.Length == 2) 5 { 6 if (kv[0] == "Host") 7 { 8 if (kv[1].Trim() == ((IPEndPoint)socket.LocalEndPoint).ToString()) 9 { 10 hostMatch = true; 11 } 12 } 13 //else if (kv[0] == "User-Agent") 14 //{ 15 // // we need to drop connections when changing servers 16 // if (kv[1].IndexOf("Chrome") >= 0) 17 // { 18 // useSocks = true; 19 // } 20 //} 21 } 22 //匹配验证,直接将pathMatch和secretMatch置为true 23 //else if (kv.Length == 1) 24 //{ 25 // if (line.IndexOf("pac", StringComparison.Ordinal) >= 0) 26 // { 27 // pathMatch = true; 28 // } 29 // if (!secretMatch) 30 // { 31 // if(line.IndexOf(PacSecret, StringComparison.Ordinal) >= 0) 32 // { 33 // secretMatch = true; 34 // } 35 36 // } 37 //} 38 } 39 pathMatch = true; 40 secretMatch = true;