Пример #1
0
        public void EnableExcludeMode(string[] appPaths, string[] ips)
        {
            string[] apps = GetAppPaths(appPaths);
            if ((apps == null || apps.Length == 0) && (ips == null || ips.Length == 0))
            {
                return;
            }

            EnsureSucceeded(
                () => _filters.EnableExcludeMode(apps, ips, _bestInterface.LocalIpAddress()),
                "SplitTunnel: Enabling exclude mode");
        }
Пример #2
0
        public void EnableExcludeMode(string[] appPaths, string[] ips)
        {
            if (appPaths != null && appPaths.Length > 0)
            {
                var apps = appPaths.Where(File.Exists).ToArray();
                if (apps.Length == 0)
                {
                    return;
                }

                EnsureSucceeded(
                    () => _filters.EnableExcludeMode(apps, _bestInterface.LocalIpAddress()),
                    "SplitTunnel: Enabling exclude mode");
            }

            if (ips != null && ips.Length > 0)
            {
                _routes.Add(ips);
            }
        }
Пример #3
0
        public void EnableExcludeMode(string[] appPaths, string[] ips)
        {
            string[] apps = new string[0];
            if (appPaths != null)
            {
                apps = appPaths.Where(File.Exists).ToArray();
            }

            string[] excludedIPs = new string[0];
            if (ips != null)
            {
                excludedIPs = ips;
            }

            if (apps.Length == 0 && excludedIPs.Length == 0)
            {
                return;
            }

            EnsureSucceeded(
                () => _filters.EnableExcludeMode(apps, excludedIPs, _bestInterface.LocalIpAddress()),
                "SplitTunnel: Enabling exclude mode");
        }