Exemple #1
0
        public List <Proxy> RemoveProxy(Proxy proxy)
        {
            yamlConfig.ProxyList.Remove(proxy);
            saveYamlConfigFile();
            List <Proxy> newProxyList = new List <Proxy>(yamlConfig.ProxyList);

            ProxyChangedEvent?.Invoke(Instance, newProxyList);
            return(new List <Proxy>(yamlConfig.ProxyList));
        }
Exemple #2
0
        public List <Proxy> AddProxy(Proxy proxy)
        {
            yamlConfig.ProxyList.Add(proxy);
            reCreateProxyGroups();
            saveYamlConfigFile();
            List <Proxy> newProxyList = new List <Proxy>(yamlConfig.ProxyList);

            ProxyChangedEvent?.Invoke(Instance, newProxyList);
            return(newProxyList);
        }