public static int reloadNetwork()
 {
     AutoLeadClientHelper.connect();
     if (AutoLeadClientHelper.connected)
     {
         LocalConfig.getCurrentConfig().getStringForKey("ProxyTool");
         string ip = LocalConfig.getCurrentConfig().myIP;
         int    sshAndVip72Port = LocalConfig.getCurrentConfig().getSSHAndVip72Port();
         if (AutoLeadClientHelper.send(new JavaScriptSerializer().Serialize((object)new Dictionary <string, object>()
         {
             ["cmd"] = (object)nameof(reloadNetwork),
             ["pac"] = (object)("function FindProxyForURL(url, host) {\r\nreturn \"SOCKS " + ip + ":" + (object)sshAndVip72Port + "\";\r\n}")
         })))
         {
             if (AutoLeadClientHelper.receive() != null)
             {
                 AutoLeadClientHelper.close();
                 return(1);
             }
             AutoLeadClientHelper.close();
         }
         else
         {
             AutoLeadClientHelper.close();
         }
     }
     return(1);
 }
 public static int reset(string key, out string serial, out string _license)
 {
     AutoLeadClientHelper.connect();
     serial   = "";
     _license = "";
     if (AutoLeadClientHelper.connected)
     {
         if (AutoLeadClientHelper.send("{\"cmd\":\"reset\", \"key\":\"" + key + "\"}"))
         {
             string input = AutoLeadClientHelper.receive();
             if (input != null)
             {
                 Console.WriteLine(input);
                 Dictionary <string, object> dictionary = new JavaScriptSerializer().Deserialize <Dictionary <string, object> >(input);
                 if (dictionary.ContainsKey("license") && dictionary.ContainsKey(nameof(serial)))
                 {
                     string license = dictionary["license"].ToString();
                     serial = dictionary[nameof(serial)].ToString();
                     if (AutoLeadClientHelper.verify(license, serial))
                     {
                         AutoLeadClientHelper.close();
                         _license = license;
                         return(Convert.ToInt32(dictionary["port"]));
                     }
                     AutoLeadClientHelper.close();
                     return(-2);
                 }
                 if (dictionary.ContainsKey(nameof(serial)))
                 {
                     serial = dictionary[nameof(serial)].ToString();
                 }
                 AutoLeadClientHelper.close();
                 return(-2);
             }
             AutoLeadClientHelper.close();
         }
         else
         {
             AutoLeadClientHelper.close();
         }
     }
     return(-1);
 }
 public static void stopRecordingEU()
 {
     AutoLeadClientHelper.connect();
     if (!AutoLeadClientHelper.connected)
     {
         return;
     }
     if (AutoLeadClientHelper.send("{\"cmd\":\"stopGetUE\"}"))
     {
         string str = AutoLeadClientHelper.receive();
         if (str != null)
         {
             Console.WriteLine(str);
         }
         AutoLeadClientHelper.close();
     }
     else
     {
         AutoLeadClientHelper.close();
     }
 }
 public static int removeProxy()
 {
     AutoLeadClientHelper.connect();
     if (AutoLeadClientHelper.connected)
     {
         if (AutoLeadClientHelper.send(new JavaScriptSerializer().Serialize((object)new Dictionary <string, object>()
         {
             ["cmd"] = (object)"reloadNetwork"
         })))
         {
             if (AutoLeadClientHelper.receive() != null)
             {
                 AutoLeadClientHelper.close();
                 return(1);
             }
             AutoLeadClientHelper.close();
         }
         else
         {
             AutoLeadClientHelper.close();
         }
     }
     return(-1);
 }