This commit is contained in:
clowwindy
2015-07-26 10:44:44 +08:00
parent a2cd2a5408
commit a0e79f37bc
2 changed files with 6 additions and 1 deletions
@@ -121,6 +121,11 @@ namespace Shadowsocks.Model
{
throw new ArgumentException(I18N.GetString("Port out of range"));
}
}
public static void CheckLocalPort(int port)
{
CheckPort(port);
if (port == 8123)
{
throw new ArgumentException(I18N.GetString("Port can't be 8123"));
+1 -1
View File
@@ -84,7 +84,7 @@ namespace Shadowsocks.View
};
int localPort = int.Parse(ProxyPortTextBox.Text);
Configuration.CheckServer(server);
Configuration.CheckPort(localPort);
Configuration.CheckLocalPort(localPort);
_modifiedConfiguration.configs[_oldSelectedIndex] = server;
_modifiedConfiguration.localPort = localPort;