示例#1
0
        public Configuration()
        {
            index     = 0;
            localPort = 1080;

            reconnectTimes = 2;
            keepVisitTime  = 180;
            connectTimeout = 5;
            dnsServer      = "";
            localDnsServer = "";

            balanceAlgorithm       = "LowException";
            random                 = true;
            sysProxyMode           = (int)ProxyMode.Pac;
            proxyRuleMode          = (int)ProxyRuleMode.BypassLanAndChina;
            IsServerLogFormTopmost = false;
            ServerLogFormLocation  = new APoint();

            nodeFeedAutoUpdate            = true;
            nodeFeedAutoLatency           = false;
            nodeFeedAutoUpdateUseProxy    = false;
            nodeFeedAutoUpdateTryUseProxy = false;

            serverSubscribes = new List <ServerSubscribe>()
            {
            };

            configs = new List <Server>()
            {
                GetDefaultServer()
            };

            hotkey = new HotkeyConfig();
        }
        public Configuration()
        {
            version               = UpdateChecker.Version;
            strategy              = "";
            index                 = 0;
            global                = false;
            enabled               = false;
            shareOverLan          = false;
            firstRun              = true;
            localPort             = 1080;
            portableMode          = true;
            showPluginOutput      = false;
            pacUrl                = "";
            useOnlinePac          = false;
            secureLocalPac        = true;
            regeneratePacOnUpdate = true;
            autoCheckUpdate       = false;
            checkPreRelease       = false;
            skippedUpdateVersion  = "";
            isVerboseLogging      = false;

            // hidden options
            isIPv6Enabled       = false;
            generateLegacyUrl   = false;
            geositeUrl          = "";
            geositeSha256sumUrl = "";
            geositeDirectGroups = new List <string>()
            {
                "private",
                "cn",
                "geolocation-!cn@cn",
            };
            geositeProxiedGroups = new List <string>()
            {
                "geolocation-!cn",
            };
            geositePreferDirect = false;
            userAgent           = "ShadowsocksWindows/$version";

            logViewer = new LogViewerConfig();
            proxy     = new ForwardProxyConfig();
            hotkey    = new HotkeyConfig();

            firstRunOnNewVersion = false;

            configs            = new List <Server>();
            onlineConfigSource = new List <string>();
        }
        public Configuration()
        {
            version                = UpdateChecker.Version;
            strategy               = "";
            index                  = 0;
            global                 = false;
            enabled                = false;
            shareOverLan           = false;
            firstRun               = true;
            localPort              = 1080;
            portableMode           = true;
            showPluginOutput       = false;
            pacUrl                 = "";
            useOnlinePac           = false;
            secureLocalPac         = true;
            regeneratePacOnUpdate  = true;
            availabilityStatistics = false;
            autoCheckUpdate        = false;
            checkPreRelease        = false;
            isVerboseLogging       = false;

            // hidden options
            isIPv6Enabled        = false;
            generateLegacyUrl    = false;
            geositeUrl           = "";
            geositeGroup         = "geolocation-!cn";
            geositeBlacklistMode = true;
            userAgent            = "ShadowsocksWindows/$version";

            logViewer = new LogViewerConfig();
            proxy     = new ProxyConfig();
            hotkey    = new HotkeyConfig();

            firstRunOnNewVersion = false;

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

            reconnectTimes = 2;
            keepVisitTime  = 180;
            connectTimeout = 5;
            dnsServer      = "";
            localDnsServer = "";

            balanceAlgorithm       = "LowException";
            enableBalance          = false;
            autoBan                = false;
            enableLogging          = true;
            sysProxyMode           = (int)ProxyMode.NoModify;
            proxyRuleMode          = (int)ProxyRuleMode.Disable;
            IsServerLogFormTopmost = false;
            ServerLogFormLocation  = new APoint();

            serverSubscribes                = new List <ServerSubscribe>();
            nodeFeedAutoUpdate              = true;
            nodeFeedAutoUpdateInterval      = 3;
            nodeFeedAutoLatency             = false;
            nodeFeedAutoLatencyInterval     = 30;
            nodeFeedAutoUpdateUseProxy      = false;
            nodeFeedAutoUpdateTryUseProxy   = false;
            sortServersBySubscriptionsOrder = true;
            LastnodeFeedAutoLatency         = 0;
            LastUpdateSubscribesTime        = 0;

            Servers = new List <Server>()
            {
                GetDefaultServer()
            };

            hotkey = new HotkeyConfig();
        }
 private void LoadCurrentConfiguration()
 {
     _modifiedConfig = _controller.GetConfigurationCopy().hotkey;
     LoadConfiguration(_modifiedConfig);
 }
 private void LoadConfiguration(HotkeyConfig config)
 {
     SwitchSystemProxyTextBox.Text = config.SwitchSystemProxy;
     SwitchProxyModeTextBox.Text = config.SwitchSystemProxyMode;
     SwitchAllowLanTextBox.Text = config.SwitchAllowLan;
     ShowLogsTextBox.Text = config.ShowLogs;
     ServerMoveUpTextBox.Text = config.ServerMoveUp;
     ServerMoveDownTextBox.Text = config.ServerMoveDown;
 }
 private void LoadConfiguration(HotkeyConfig config)
 {
     SwitchSystemProxyTextBox.Text = config.SwitchSystemProxy;
     ChangeToPacTextBox.Text = config.ChangeToPac;
     ChangeToGlobalTextBox.Text = config.ChangeToGlobal;
     SwitchAllowLanTextBox.Text = config.SwitchAllowLan;
     ShowLogsTextBox.Text = config.ShowLogs;
     ServerMoveUpTextBox.Text = config.ServerMoveUp;
     ServerMoveDownTextBox.Text = config.ServerMoveDown;
 }