Browse Source

replace 'one_time_auth' to 'auth'

tags/3.0
Gang Zhuo 9 years ago
parent
commit
29d70acfb5
4 changed files with 7 additions and 7 deletions
  1. +1
    -1
      shadowsocks-csharp/Controller/Service/TCPRelay.cs
  2. +2
    -2
      shadowsocks-csharp/Controller/Service/UDPRelay.cs
  3. +2
    -2
      shadowsocks-csharp/Model/Server.cs
  4. +2
    -2
      shadowsocks-csharp/View/ConfigForm.cs

+ 1
- 1
shadowsocks-csharp/Controller/Service/TCPRelay.cs View File

@@ -125,7 +125,7 @@ namespace Shadowsocks.Controller
{
throw new ArgumentException("No server configured");
}
this.encryptor = EncryptorFactory.GetEncryptor(server.method, server.password, server.one_time_auth, false);
this.encryptor = EncryptorFactory.GetEncryptor(server.method, server.password, server.auth, false);
this.server = server;
}


+ 2
- 2
shadowsocks-csharp/Controller/Service/UDPRelay.cs View File

@@ -74,7 +74,7 @@ namespace Shadowsocks.Controller
}
public void Send(byte[] data, int length)
{
IEncryptor encryptor = EncryptorFactory.GetEncryptor(_server.method, _server.password, _server.one_time_auth, true);
IEncryptor encryptor = EncryptorFactory.GetEncryptor(_server.method, _server.password, _server.auth, true);
byte[] dataIn = new byte[length - 3 + IVEncryptor.ONETIMEAUTH_BYTES];
Array.Copy(data, 3, dataIn, 0, length - 3);
byte[] dataOut = new byte[length - 3 + 16 + IVEncryptor.ONETIMEAUTH_BYTES];
@@ -97,7 +97,7 @@ namespace Shadowsocks.Controller
byte[] dataOut = new byte[bytesRead];
int outlen;
IEncryptor encryptor = EncryptorFactory.GetEncryptor(_server.method, _server.password, _server.one_time_auth, true);
IEncryptor encryptor = EncryptorFactory.GetEncryptor(_server.method, _server.password, _server.auth, true);
encryptor.Decrypt(_buffer, bytesRead, dataOut, out outlen);
byte[] sendBuf = new byte[outlen + 3];


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

@@ -17,7 +17,7 @@ namespace Shadowsocks.Model
public string password;
public string method;
public string remarks;
public bool one_time_auth;
public bool auth;
public override int GetHashCode()
{
@@ -53,7 +53,7 @@ namespace Shadowsocks.Model
this.method = "aes-256-cfb";
this.password = "";
this.remarks = "";
this.one_time_auth = false;
this.auth = false;
}
public Server(string ssURL) : this()


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

@@ -84,7 +84,7 @@ namespace Shadowsocks.View
password = PasswordTextBox.Text,
method = EncryptionSelect.Text,
remarks = RemarksTextBox.Text,
one_time_auth = OneTimeAuth.Checked
auth = OneTimeAuth.Checked
};
int localPort = int.Parse(ProxyPortTextBox.Text);
Configuration.CheckServer(server);
@@ -117,7 +117,7 @@ namespace Shadowsocks.View
ProxyPortTextBox.Text = _modifiedConfiguration.localPort.ToString();
EncryptionSelect.Text = server.method ?? "aes-256-cfb";
RemarksTextBox.Text = server.remarks;
OneTimeAuth.Checked = server.one_time_auth;
OneTimeAuth.Checked = server.auth;
}
}


Loading…
Cancel
Save