replace 'one_time_auth' to 'auth'
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user