Browse Source

fix #235

tags/2.5.1
clowwindy 9 years ago
parent
commit
a0e79f37bc
2 changed files with 6 additions and 1 deletions
  1. +5
    -0
      shadowsocks-csharp/Model/Configuration.cs
  2. +1
    -1
      shadowsocks-csharp/View/ConfigForm.cs

+ 5
- 0
shadowsocks-csharp/Model/Configuration.cs View File

@@ -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
shadowsocks-csharp/View/ConfigForm.cs 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;


Loading…
Cancel
Save