Exemple #1
0
        public static ProxyResult Check(WebProxy p, int port, string sslURL = "", string cURL = "")
        {
            object[] result = ProxyCheck("http://azenv.net/", p);

            if (result == null)
            {
                return(new ProxyResult(false, "", new [] { "", "" }, 0, false, false));
            }


            var lvl = GetLevel(result[0] as string, port);

            object[] ssl    = null;
            object[] custom = null;
            if (!string.IsNullOrWhiteSpace(sslURL))
            {
                ssl = ProxyCheck(sslURL, p);
            }

            if (!string.IsNullOrWhiteSpace(cURL))
            {
                custom = ProxyCheck(cURL, p);
            }



            return(new ProxyResult(true, lvl.ToString(),
                                   CountryInfo.GetCountryInfo(p.Address.ToString().RegexMatch(@"http:\/\/(.*?)(\/|:)").Groups[1].Value),
                                   (long)result[1],
                                   ssl != null,
                                   custom != null
                                   ));
        }
Exemple #2
0
    public void CheckCountries(string countryName)
    {
        if (countryName == "Canada" && countryInfo.canConfig == true)
        {
            countryInfo.GetCountryInfo("Canada", "Neutral", "Ottawa", 0);
            conrtolPanel.GetCountryInfo("Canada");

            movePos = new Vector3(13.12f, -4.79f, 2.2f);
        }

        else if (countryName == "United States" && countryInfo.canConfig == true)
        {
            countryInfo.GetCountryInfo("United States", "Neutral", "Washington D. C.", 0);
            conrtolPanel.GetCountryInfo("United States Of America");

            movePos = new Vector3(15.89f, -2.85f, 5.61f);
        }

        else if (countryName == "Russian Federation" && countryInfo.canConfig == true)
        {
            countryInfo.GetCountryInfo("Russian Federation", "Neutral", "Moscow", 0);
            conrtolPanel.GetCountryInfo("Russian Federation");
            FOVAmount = 12.84f;

            movePos = new Vector3(-15.77f, -2.85f, 13.9f);
        }

        else if (countryName == "China" && countryInfo.canConfig == true)
        {
            countryInfo.GetCountryInfo("Peoples Rep. China", "Neutral", "Beijing", 0);
            conrtolPanel.GetCountryInfo("China");

            movePos = new Vector3(-15.34f, -1.62f, 0);
        }

        else if (countryName == "Iran" && countryInfo.canConfig == true)
        {
            countryInfo.GetCountryInfo("Iran", "Neutral", "Tehran", 0);
            conrtolPanel.GetCountryInfo("Iran");

            movePos = new Vector3(-7.92f, -1.42f, -6.3f);
        }

        else if (countryName == "India" && countryInfo.canConfig == true)
        {
            countryInfo.GetCountryInfo("India", "Neutral", "New Delhi", 0);
            conrtolPanel.GetCountryInfo("India");

            movePos = new Vector3(-11.91f, .52f, -4.33f);
        }
    }