Update PACServerHandle.cs

2dust 2019-09-23 22:02:20 +08:00
parent 1943757f43
commit cfb93a9ff2
1 changed files with 9 additions and 1 deletions

View File

@ -17,6 +17,13 @@ namespace v2rayN.HttpProxyHandler
{ {
private static int pacPort = 0; private static int pacPort = 0;
private static HttpWebServer server; private static HttpWebServer server;
public bool IsRunning
{
get
{
return (server != null && pacPort > 0);
}
}
public static void Init(Config config) public static void Init(Config config)
{ {
@ -68,7 +75,6 @@ namespace v2rayN.HttpProxyHandler
return true; return true;
} }
public static string SendResponse(string address) public static string SendResponse(string address)
{ {
try try
@ -117,6 +123,7 @@ namespace v2rayN.HttpProxyHandler
//} //}
} }
private static string GetPacList(string address) private static string GetPacList(string address)
{ {
var port = Global.sysAgentPort; var port = Global.sysAgentPort;
@ -144,5 +151,6 @@ namespace v2rayN.HttpProxyHandler
} }
return "No pac content"; return "No pac content";
} }
} }
} }