Browse Source

set default method to chacha20-ietf-poly1305 in all place...

tags/4.1.9.2-a-nbbnu^2^2
Student Main 4 years ago
parent
commit
dcb6092eb8
3 changed files with 7 additions and 4 deletions
  1. +1
    -1
      shadowsocks-csharp/Encryption/EncryptorFactory.cs
  2. +5
    -2
      shadowsocks-csharp/Model/Server.cs
  3. +1
    -1
      shadowsocks-csharp/View/ConfigForm.cs

+ 1
- 1
shadowsocks-csharp/Encryption/EncryptorFactory.cs View File

@@ -70,7 +70,7 @@ namespace Shadowsocks.Encryption
{
if (method.IsNullOrEmpty())
{
method = "aes-256-cfb";
method = Model.Server.DefaultMethod;
}
method = method.ToLowerInvariant();


+ 5
- 2
shadowsocks-csharp/Model/Server.cs View File

@@ -11,6 +11,9 @@ namespace Shadowsocks.Model
[Serializable]
public class Server
{
public const string DefaultMethod = "chacha20-ietf-poly1305";
public const int DefaultPort = 8388;
#region ParseLegacyURL
public static readonly Regex
UrlFinder = new Regex(@"ss://(?<base64>[A-Za-z0-9+-/=_]+)(?:#(?<tag>\S+))?", RegexOptions.IgnoreCase),
@@ -69,8 +72,8 @@ namespace Shadowsocks.Model
public Server()
{
server = "";
server_port = 8388;
method = "chacha20-ietf-poly1305";
server_port = DefaultPort;
method = DefaultMethod;
plugin = "";
plugin_opts = "";
plugin_args = "";


+ 1
- 1
shadowsocks-csharp/View/ConfigForm.cs View File

@@ -316,7 +316,7 @@ namespace Shadowsocks.View
IPTextBox.Text = server.server;
ServerPortTextBox.Text = server.server_port.ToString();
PasswordTextBox.Text = server.password;
EncryptionSelect.Text = server.method ?? "aes-256-cfb";
EncryptionSelect.Text = server.method ?? Server.DefaultMethod;
PluginTextBox.Text = server.plugin;
PluginOptionsTextBox.Text = server.plugin_opts;
PluginArgumentsTextBox.Text = server.plugin_args;


Loading…
Cancel
Save