增加只允许192和127开头的IP连接软件

develop
lhiven 1 day ago
parent e1635b33e9
commit 6bfe88107c

@ -979,6 +979,16 @@ namespace Rs.MotionPlat.Entitys
{
if(endPoint.Address.ToString()!="127.0.0.1")
{
MessageQueue.Instance.Insert($"ip:{endPoint.Address.ToString()},port:{endPoint.Port.ToString()} illegal ip force closed!");
clientSocket.Close();
continue;
}
}
else
{
if (endPoint.Address.ToString().IndexOf("192")<0 && endPoint.Address.ToString().IndexOf("169")<0)
{
MessageQueue.Instance.Insert($"ip:{endPoint.Address.ToString()},port:{endPoint.Port.ToString()} illegal ip force closed!");
clientSocket.Close();
continue;
}

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
[assembly: AssemblyVersion("20.25.37.2")]
[assembly: AssemblyVersion("20.25.38.1")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

Loading…
Cancel
Save