Пример #1
0
        public Configuration()
        {
            index     = 0;
            localPort = 1080;

            reconnectTimes = 2;
            keepVisitTime  = 180;
            connectTimeout = 5;
            dnsServer      = string.Empty;
            localDnsServer = string.Empty;

            balanceAlgorithm = LoadBalance.LowException.ToString();
            random           = false;
            sysProxyMode     = ProxyMode.NoModify;
            proxyRuleMode    = ProxyRuleMode.Disable;

            checkSwitchAutoCloseAll = true;
            logEnable = true;

            AutoCheckUpdate = true;
            isPreRelease    = true;

            LangName = string.Empty;

            serverSubscribes = new List <ServerSubscribe>();

            configs = new List <Server>();
        }
        public Configuration()
        {
            index     = 0;
            localPort = 1080;

            reconnectTimes = 2;
            keepVisitTime  = 180;
            connectTimeout = 5;
            dnsServer      = string.Empty;
            localDnsServer = string.Empty;

            balanceAlgorithm = @"LowException";
            random           = false;
            sysProxyMode     = ProxyMode.NoModify;
            proxyRuleMode    = ProxyRuleMode.Disable;

            AutoCheckUpdate    = true;
            isPreRelease       = false;
            nodeFeedAutoUpdate = true;

            serverSubscribes = new List <ServerSubscribe>();

            configs = new ObservableCollection <Server>();
        }
 /// <summary>
 /// 切换代理规则
 /// </summary>
 /// <param name="mode"></param>
 public void ToggleRuleMode(ProxyRuleMode mode)
 {
     Global.GuiConfig.ProxyRuleMode = mode;
     SaveAndNotifyChanged();
 }
Пример #4
0
 public void ToggleRuleMode(ProxyRuleMode mode)
 {
     _config.proxyRuleMode = mode;
     Save();
     Application.Current.Dispatcher?.Invoke(() => { ToggleRuleModeChanged?.Invoke(this, new EventArgs()); });
 }