Fix port range check and move Sip003Plugin.

This commit is contained in:
Raif Atef
2017-08-17 11:11:06 +02:00
parent f04b497d79
commit caa96ad334
3 changed files with 4 additions and 3 deletions
@@ -6,7 +6,7 @@ using System.Net.Sockets;
using System.Reflection;
using Shadowsocks.Model;
namespace Shadowsocks.Proxy
namespace Shadowsocks.Controller.Service
{
// https://github.com/shadowsocks/shadowsocks-org/wiki/Plugin
public sealed class Sip003Plugin : IDisposable
@@ -41,7 +41,7 @@ namespace Shadowsocks.Proxy
{
throw new ArgumentException("Value cannot be null or whitespace.", nameof(serverAddress));
}
if ((uint)serverPort != serverPort)
if ((ushort)serverPort != serverPort)
{
throw new ArgumentOutOfRangeException("serverPort");
}
@@ -15,6 +15,7 @@ using Shadowsocks.Model;
using Shadowsocks.Properties;
using Shadowsocks.Util;
using System.Linq;
using Shadowsocks.Controller.Service;
using Shadowsocks.Proxy;
namespace Shadowsocks.Controller
+1 -1
View File
@@ -145,7 +145,7 @@
<Compile Include="Controller\Strategy\BalancingStrategy.cs" />
<Compile Include="Controller\Strategy\StrategyManager.cs" />
<Compile Include="Controller\Strategy\IStrategy.cs" />
<Compile Include="Proxy\Sip003Plugin.cs" />
<Compile Include="Controller\Service\Sip003Plugin.cs" />
<Compile Include="Proxy\Socks5Proxy.cs" />
<Compile Include="Settings.cs" />
<Compile Include="StringEx.cs" />