public void SwitchToGatari()
        {
            var lines  = HostsFile.ReadAllLines();
            var result = lines.Where(x => !x.Contains("ppy.sh")).ToList();

            result.AddRange
            (
                serverAddress + " osu.ppy.sh",
                serverAddress + " c.ppy.sh",
                serverAddress + " c1.ppy.sh",
                serverAddress + " a.ppy.sh",
                serverAddress + " i.ppy.sh"
            );
            HostsFile.WriteAllLines(result);
        }
Exemple #2
0
        public void SwitchDebian()
        {
            var lines  = HostsFile.ReadAllLines();
            var result = lines.Where(x => !x.Contains("ppy.sh")).ToList();

            result.AddRange
            (
                serverip + " osu.ppy.sh",
                serverip + " c.ppy.sh",
                serverip + " c1.ppy.sh",
                serverip + " c2.ppy.sh",
                serverip + " c3.ppy.sh",
                serverip + " c4.ppy.sh",
                serverip + " c5.ppy.sh",
                serverip + " c6.ppy.sh",
                serverip + " ce.ppy.sh",
                serverip + " a.ppy.sh",
                serverip + " i.ppy.sh"
            );
            HostsFile.WriteAllLines(result);
        }
Exemple #3
0
        public void SwitchToMinase()
        {
            var           lines = HostsFile.AllLines();
            var           res   = lines.Where(x => !x.Contains("osu.ppy.sh")).ToList();
            List <string> a     = new List <string>();

            a.Add(ip + " osu.ppy.sh");
            a.Add(ip + " c.ppy.sh");
            a.Add(ip + " c1.ppy.sh");
            a.Add(ip + " c2.ppy.sh");
            a.Add(ip + " c3.ppy.sh");
            a.Add(ip + " c4.ppy.sh");
            a.Add(ip + " c5.ppy.sh");
            a.Add(ip + " c6.ppy.sh");
            a.Add(ip + " ce.ppy.sh");
            a.Add(ip + " a.ppy.sh");
            a.Add(ip + " i.ppy.sh");
            a.Add(ip + " s.ppy.sh");

            /*
             *  айпишники которые надо добавить A.K.A кастыль
             *  ip + "c1.ppy.sh",
             *  ip + "c2.ppy.sh",
             *  ip + "c3.ppy.sh",
             *  ip + "c4.ppy.sh",
             *  ip + "c5.ppy.sh",
             *  ip + "c6.ppy.sh",
             *  ip + "ce.ppy.sh",
             *  ip + "a.ppy.sh",
             *  ip + "i.ppy.sh",
             *  ip + "s.ppy.sh"
             */
            res.AddRange(a);

            HostsFile.WriteAllLines(res);
        }
Exemple #4
0
 public void SwitchToOfficial()
 {
     HostsFile.WriteAllLines(HostsFile.ReadAllLines().Where(x => !x.Contains("ppy.sh")));
 }