Fix port range check and move Sip003Plugin.
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user