Browse Source

Fix port range check and move Sip003Plugin.

tags/4.0.6
Raif Atef 7 years ago
parent
commit
caa96ad334
3 changed files with 4 additions and 3 deletions
  1. +2
    -2
      shadowsocks-csharp/Controller/Service/Sip003Plugin.cs
  2. +1
    -0
      shadowsocks-csharp/Controller/ShadowsocksController.cs
  3. +1
    -1
      shadowsocks-csharp/shadowsocks-csharp.csproj

shadowsocks-csharp/Proxy/Sip003Plugin.cs → shadowsocks-csharp/Controller/Service/Sip003Plugin.cs View File

@@ -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");
}

+ 1
- 0
shadowsocks-csharp/Controller/ShadowsocksController.cs View File

@@ -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
shadowsocks-csharp/shadowsocks-csharp.csproj 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" />


Loading…
Cancel
Save