Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions Build/Linux/CppUnitTest.workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Workspace Name="CppUnitTest" Database="" Version="10.0.0">
<Project Name="Test" Path="../../CppUnitTest/Test.project" Active="Yes"/>
<BuildMatrix>
<WorkspaceConfiguration Name="Debug" Selected="no">
<Environment/>
<Project Name="Test" ConfigName="Debug"/>
</WorkspaceConfiguration>
<WorkspaceConfiguration Name="Release" Selected="yes">
<Environment/>
<Project Name="Test" ConfigName="Release"/>
</WorkspaceConfiguration>
</BuildMatrix>
</CodeLite_Workspace>
Binary file added Build/Linux/Linux_Bin/AutoTestClient
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/CommonTCPClient
Binary file not shown.
53 changes: 53 additions & 0 deletions Build/Linux/Linux_Bin/ConsoleCommand.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<config>
<!-- 可以在这里配置各个命令的用户支持,User可以是多个,中间用,隔开, -->
<!-- 如果对应命令没有配置这个用户,则该用户无法使用这个指令 -->
<!-- User对应main.xml里面的ConsoleKey->Key -->
<CommandInfo CommandName="LoadModule" User="freeeyes" desc="加载模块" />
<CommandInfo CommandName="UnLoadModule" User="freeeyes" desc="卸载模块" />
<CommandInfo CommandName="ReLoadModule" User="freeeyes" desc="重新加载模块" />
<CommandInfo CommandName="ShowModule" User="freeeyes" desc="重新加载模块" />
<CommandInfo CommandName="ClientCount" User="freeeyes" desc="当前客户端连接数" />
<CommandInfo CommandName="CommandInfo" User="freeeyes" desc="当前某一个信令的状态信息" />
<CommandInfo CommandName="CommandTimeout" User="freeeyes" desc="所有超时的信令列表" />
<CommandInfo CommandName="CommandTimeoutclr" User="freeeyes" desc="清除超时的信令列表" />
<CommandInfo CommandName="CommandDataLog" User="freeeyes" desc="存储CommandDataLog" />
<CommandInfo CommandName="WorkThreadState" User="freeeyes" desc="当前解析线程和工作线程状态" />
<CommandInfo CommandName="ConnectClient" User="freeeyes" desc="当前客户端链接的信息" />
<CommandInfo CommandName="UDPConnectClient" User="freeeyes" desc="当前UDP客户端的链接信息" />
<CommandInfo CommandName="CloseClient" User="freeeyes" desc="关闭指定客户端" />
<CommandInfo CommandName="ForbiddenIP" User="freeeyes" desc="禁止IP访问" />
<CommandInfo CommandName="ShowForbiddenIP" User="freeeyes" desc="查看禁止访问IP列表" />
<CommandInfo CommandName="LiftedIP" User="freeeyes" desc="LiftedIP" />
<CommandInfo CommandName="ServerConnectTCP" User="freeeyes" desc="服务器间通讯(TCP)" />
<CommandInfo CommandName="ServerConnectUDP" User="freeeyes" desc="服务器间通讯(UDP)" />
<CommandInfo CommandName="ShowCurrProcessInfo" User="freeeyes" desc="查看当前服务器的运行状态" />
<CommandInfo CommandName="ShowConnectHistory" User="freeeyes" desc="查看服务器历史链接状态" />
<CommandInfo CommandName="ShowAllCommand" User="freeeyes" desc="查看服务器所有注册模块信令信息" />
<CommandInfo CommandName="ShowServerInfo" User="freeeyes,guest" desc="查看服务器基本信息" />
<CommandInfo CommandName="ReConnectServer" User="freeeyes" desc="远端控制重练某一个远端服务器" />
<CommandInfo CommandName="SetDebug" User="freeeyes" desc="设置当前DEBUG状态" />
<CommandInfo CommandName="ShowDebug" User="freeeyes" desc="查看当前DEBUG状态" />
<CommandInfo CommandName="SetTrackIP" User="freeeyes" desc="设置IP数据染色" />
<CommandInfo CommandName="SetTrackCommand" User="freeeyes" desc="设置命令数据染色" />
<CommandInfo CommandName="GetTrackCommandInfo" User="freeeyes" desc="得到命令染色列表信息" />
<CommandInfo CommandName="GetConnectIPInfo" User="freeeyes" desc="通过ConnectID获得相关的IP信息" />
<CommandInfo CommandName="GetLogInfo" User="freeeyes" desc="得到日志等级" />
<CommandInfo CommandName="SetLogLevel" User="freeeyes" desc="设置日志等级" />
<CommandInfo CommandName="GetWorkThreadAI" User="freeeyes" desc="得到Thread的AI配置信息" />
<CommandInfo CommandName="GetWorkThreadTO" User="freeeyes" desc="得到Thread的所有超时数据包信息" />
<CommandInfo CommandName="SetWorkThreadAI" User="freeeyes" desc="设置ThreadAI的配置信息" />
<CommandInfo CommandName="GetNickNameInfo" User="freeeyes" desc="得到别名信息" />
<CommandInfo CommandName="SetConnectLog" User="freeeyes" desc="设置连接日志开启状态" />
<CommandInfo CommandName="SetMaxConnectCount" User="freeeyes" desc="设置最大连接数" />
<CommandInfo CommandName="AddListen" User="freeeyes" desc="添加一个新的监听端口" />
<CommandInfo CommandName="DelListen" User="freeeyes" desc="删除一个新的监听端口" />
<CommandInfo CommandName="ShowListen" User="freeeyes" desc="查看正在打开的监听端口" />
<CommandInfo CommandName="Monitor" User="freeeyes" desc="监控相关运行参数接口" />
<CommandInfo CommandName="ServerClose" User="freeeyes" desc="关闭当前服务器" />
<CommandInfo CommandName="TestFileStart" User="freeeyes" desc="启动服务器文件测试用例" />
<CommandInfo CommandName="TestFileStop" User="freeeyes" desc="停止服务器文件测试用例" />
<CommandInfo CommandName="PortFlow" User="freeeyes" desc="获得当前BuffPacket使用情况" />
<CommandInfo CommandName="BuffPacketState" User="freeeyes" desc="获得当前BuffPacket使用情况" />
<CommandInfo CommandName="PoolSet" User="freeeyes" desc="设置当前内存池的使用痕迹" />
</config>
2 changes: 2 additions & 0 deletions Build/Linux/Linux_Bin/CppUnitTest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Config]
CppUnitTest=aaa
1 change: 1 addition & 0 deletions Build/Linux/Linux_Bin/FileTest/1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
01 00 00 10 08 00 00 00 46 45 45 45 45 59 45 53 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 be cd aa 8f 3c 01 00 00
9 changes: 9 additions & 0 deletions Build/Linux/Linux_Bin/FileTestCfg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<Config>
<!-- 文件测试相关设置 ContentType=1是二进制协议,0是文本协议,ResponseCount表示整组协议期望的应答条数,ExpectTime期望测试时总的耗时(单位毫秒)-->
<!-- ExpectTime时间必须在TimeInterval周期内 -->
<FileTestConfig Path="./FileTest/" TimeInterval="10" ConnectCount="1" ResponseCount="1" ExpectTime="500" ParseID="1" ContentType="1" Desc="文件测试相关设置" />
<!-- 协议文件信息,协议文件需要按照业务逻辑先后顺序配置,其中FileName是包含协议内容的文件名-->
<!-- FileInfo可以是多个,单一数据包目前大小不能超过10K -->
<FileInfo FileName="1.txt" Desc="PSS 测试" />
</Config>
6 changes: 6 additions & 0 deletions Build/Linux/Linux_Bin/FileWatch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Config>
<FileInfo ID="1" Path="./Log/Operation/ViewWorkThread" Key="ViewWorkThread" WatchTime="10" ShellCmd="runpss.sh" />

<ConsoleInfo IP="127.0.0.1" Port="10010" Keypwd="freeeyes" />
</Config>
Binary file added Build/Linux/Linux_Bin/Icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
1 change: 1 addition & 0 deletions Build/Linux/Linux_Bin/LoginBufferFile/UserValid.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
freeeyes,123456;horse,111111;rabbit,222222;freeeyes1,123456;freeeyes2,123456;freeeyes3,123456;freeeyes4,123456;freeeyes5,123456;freeeyes6,123456;freeeyes7,123456;freeeyes8,123456;freeeyes9,123456;freeeyes10,123456;freeeyes11,123456;freeeyes12,123456;freeeyes13,123456;freeeyes14,123456;freeeyes15,123456;freeeyes16,123456;freeeyes17,123456;freeeyes18,123456;freeeyes19,123456;freeeyes20,123456;freeeyes21,123456;freeeyes22,123456;freeeyes23,123456;freeeyes24,123456;freeeyes25,123456;freeeyes26,123456;freeeyes27,123456;freeeyes28,123456;
Expand Down
36 changes: 36 additions & 0 deletions Build/Linux/Linux_Bin/LuaScript/LuaTest.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
--����һ����׼��Lua PassTcp�ű�
--�ṩ�����¼��ķ�װ�ͽ��յ������¼��ķ�װ
--�������������֯��ķ������ݺ���֤��������
--����ӿ�������ƣ���Ҫ�ǿ��ǵ����̲߳������������ٲ���Ҫ���߳���
--������������ݿ鲻Ҫ�ڽű���������������㲻���ͷ�
--Ŀǰ���֧��100K�����ݿ��С
--add by freeeyes

--Ҫ�������ݵ��¼�����PassTCP���ã�����ʵ����ķ������ݷ��
--��ڲ�����nThreadID�ǵ�ǰ�߳�ID��szData����Ϣ����(char* ����)��nLen�ǻ�������󳤶ȣ�nSendIndex�ǵ�ǰ���ӵķ��ʹ���
function LuaTest_SendData(szData, nLen, nThreadID, nSendIndex)
--������������
--szDataΪchar* ����Ҫ���Ļ���顣
--nLen�ǵ�ǰ�������󳤶�
--���nNextIndex����-1����˵����ֵ����,���򷵻���һ�ε���ʼ��λ��

--����4�ֽڰ�ͷ
nPacketSize = 10
nStartIndex = 0
nNextIndex = 0
nNextIndex = Lua_Tcp_Buffer_In_Int32(szData, nPacketSize, nStartIndex, nLen)

--����2�ֽڵ�������
--nCommandID = 4096
--nNextIndex = Lua_Tcp_Buffer_In_Int16(szData, nCommandID, nNextIndex, nLen)

--�������ݿ�
szBuff = '12345678'
nNextIndex = Lua_Tcp_Buffer_In_Block(szData, szBuff, 8, nNextIndex, nLen)

--������뷵��������ݿ�ij��ȣ���PassTCP֪�����������ܳ���
return nNextIndex
end



187 changes: 187 additions & 0 deletions Build/Linux/Linux_Bin/LuaScript/RoomLogic.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
--�ڷ����е��߼�
--add by freeeyes

ROOM_PLAYER_SIZE = 5 --��������Ҳμӵ��������
ROOM_PLAYER_VISITOR_SIZE = 5 --�۲�����ҵ�������

ROOM_ERROR_NULL = 0 --��ȷ�ķ���ֵ

--��ҽ��뷿�䣬nRoomID������ID��nPlayerID�����ID
function EnterRoom(nRoomID, nPlayerID)
--�����������λ����������ʾ
if LuaFn_Room_API_GetPlayerCount(nRoomID) > ROOM_PLAYER_SIZE then
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] Room Player is full.")
return -1
end

--��������ڲι��������������ʾ
if LuaFn_Room_API_GetVisitorPlayerCount(nRoomID) > ROOM_PLAYER_SIZE then
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] Room Player is full.")
return -1
end

--���뷿��
nRet = LuaFn_Room_API_EnterRoom(nRoomID, nPlayerID, "freeeyes", 1000)
if nRet ~= ROOM_ERROR_NULL then
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] EnterRoom fail.[nRet="..nRet.."]")
return -1
else
--LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] EnterRoom success.")

--�ⲿ��Ϊ���Դ��룬�������ݸ���
--nCount = LuaFn_Room_API_GetPlayerCount(nRoomID)
--nVisitorCount = LuaFn_Room_API_GetVisitorPlayerCount(nRoomID)
--LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] EnterRoom [Count="..nCount.."][Visit Count="..nVisitorCount.."]")
return 0
end
end

--������£�nRoomID������ID��nPlayerID�����ID, nLocation������λ��
function SitRoom(nRoomID, nPlayerID, nLocation)
--��������
nRet = LuaFn_Room_API_PlayerSit(nRoomID, nPlayerID, nLocation)
if nRet ~= ROOM_ERROR_NULL then
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] SitRoom fail.[nRet="..nRet.."]")
return -1
else
--LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] SitRoom success.")

--�жϷ����Ƿ���ڶ�ʱ��
if LuaFn_RoomTimer_API_Check(nRoomID) == false then
--���û�ж�ʱ�������չ�����һ����ʱ��
nCount = LuaFn_Room_API_GetPlayerCount(nRoomID)
nVisitorCount = LuaFn_Room_API_GetVisitorPlayerCount(nRoomID)
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] SitRoom [Count="..nCount.."][Visit Count="..nVisitorCount.."]")
if nCount > 1 then
--�жϵ�ǰʱ���Ƿ���ڷ������ʱ��5��
if LuaFn_Room_API_CheckRoomUpdateTime(nRoomID, 5) == true then
--����һ������Ķ�ʱ��
nRet = LuaFn_RoomTimer_API_Add(2, nRoomID, nPlayerID, 1001)
if nRet <= 0 then
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] SitRoom timer fail.[nRet="..nRet.."]")
else
--LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] SitRoom timer success.[nsecond=5]")
end
else
--����һ������Ķ�ʱ��
nRet = LuaFn_RoomTimer_API_Add(5, nRoomID, nPlayerID, 1001)
if nRet <= 0 then
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] SitRoom timer fail.[nRet="..nRet.."]")
else
--LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] SitRoom timer success.[nsecond=2]")
end
end
end
end
end
return 0
end

--����뿪����nRoomID������ID��nPlayerID�����ID
function ExitRoom(nRoomID, nPlayerID)
--���Դ���
--nCount = LuaFn_Room_API_GetPlayerCount(nRoomID)
--nVisitorCount = LuaFn_Room_API_GetVisitorPlayerCount(nRoomID)
--LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] ExitRoom [Count="..nCount.."][Visit Count="..nVisitorCount.."]")

--�����һ���û�
--nPlayerID1 = LuaFn_Room_API_GetRoomNextPlayerID(nRoomID)
--nPlayerID2 = LuaFn_Room_API_GetRoomNextPlayerID(nRoomID)
--LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] ExitRoom [nPlayerID1="..nPlayerID1.."][nPlayerID2="..nPlayerID2.."]")

nRet = LuaFn_Room_API_Exit(nRoomID, nPlayerID)
if nRet ~= ROOM_ERROR_NULL then
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] ExitRoom fail.[nRet="..nRet.."]")
return -1
else
--LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] ExitRoom success.")

--���Դ���
--nCount = LuaFn_Room_API_GetPlayerCount(nRoomID)
--nVisitorCount = LuaFn_Room_API_GetVisitorPlayerCount(nRoomID)
--LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] ExitRoom [Count="..nCount.."][Visit Count="..nVisitorCount.."]")
return 0
end
end

--�����߳���ҹ���nRoomID������ID��nPlayerID�����ID��nOperationIDc������ID
function OutRoom(nRoomID, nPlayerID, nOperationID)

end

--��ұ任���䣬nSrcRoomID��ԭʼ����ID��nDstRoomID��Ŀ�귿��ID��nPlayerID�����ID
function ChangeRoom(nSrcRoomID, nDstRoomID, nPlayerID)

end

--�����¼������ʱ���µ��á�nEventID���¼�ID��nPlayerID�������ID�����û����Ҵ�������-1
function Update(nRoomID, nPlayerID, nEventID, nData)
--�����ע
if nEventID == 3001 then
nRet = LuaFn_Room_API_SetPlayerBet(nRoomID, nPlayerID, nData)
if nRet ~= ROOM_ERROR_NULL then
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] Update SetPlayerBet.[nRet="..nRet.."]")
return 0
else
--�ƶ�����һ�����
nNextPlayer = LuaFn_Room_API_GetRoomNextPlayerID(nRoomID)
if nNextPlayer > 0 then
--���㵱ǰ�ִ��Dz������һ��
if LuaFn_Room_GameInfo_API_GetRoundCount(nRoomID) >= 4 then
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] Update LuaFn_Room_GameInfo_API_GetRoundCount.[RoundCount=4]")
--����������ƾֽ���
else

--����һ���������װ�϶�ʱ��
LuaFn_PlayerTimer_API_Add(5, nRoomID, nNextPlayer, 2001)
end
else
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] Update GetRoomNextPlayerID.[nRet="..nRet.."]")
end
end
end

return 0
end

--�������䣬ȫ���˳�
function ClearRoom()

end

--��ʼ������
function InitRoom()

end

--���Player���ϵĶ�ʱ������
function PlayerTimer(nRoomID, nPlayerID, nEventID)
if nEventID == 2001 then
--�������û����ע
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] PlayerTimer Begin")

--�����ﴦ������ƶ��Ĺ���
end
end

--����Ķ�ʱ������
function RoomTimer(nRoomID, nPlayerID, nEventID)
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] RoomTimer Begin")
if nEventID == 1001 then
--�����1001�¼�����ô���ǵ�ʱ�����¼�(�����C++������������˷��ƣ��´�äע��Сäע�Լ���Ƿ���״̬������)
nRet = LuaFn_Room_API_DealCode(nRoomID, 1000, -1, -1)
if nRet ~= ROOM_ERROR_NULL then
LuaFn_Print("RoomID["..nRoomID.."],nPlayerID["..nPlayerID.."] RoomTimer Begin DealCode.[nRet="..nRet.."]")
return 0
else
nCurrPlayerID = LuaFn_Room_API_GetRoomCurrPlayerID(nRoomID)

--���ÿ�ʼ�����ID���Դ�Ϊ�ִμ�������ݣ����GetRoomNextPlayerID���������ң����ִμ���+1
LuaFn_Room_API_SetBenginePlayerID(nCurrPlayerID)

--����һ�����Ƶ�������Ӷ�ʱ��
LuaFn_PlayerTimer_API_Add(5, nRoomID, nPlayerID, 2001)
end
end
end

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libAutoTest
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libFtpTest
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libHttp
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libKafkaClient
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libLGLogic
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libLsPlugIn
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libLuaTest
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libMonitorServer
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libMutiProcess_Queue
Binary file not shown.
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libPlugA
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libPlugB
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libProxy
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libProxyServer
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libRealTimeMonitor
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libTTyTest
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libTcpTest
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libTestTCPPost
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libTestUDPPost
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libTimerTest
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libUDPTest
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libWebSocket
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libXMLParse
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Module/libZooClient
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/PSSLoginClient
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/PSSPlugClient
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/PSSProxyClient
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/PSS_ClientManager
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/PassTCP
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/PssFtpClient
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/PurenessScopeServer
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/Test
Binary file not shown.
Binary file added Build/Linux/Linux_Bin/XML2CPP
Binary file not shown.
27 changes: 27 additions & 0 deletions Build/Linux/Linux_Bin/alert.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<config>
<!-- 告警阀值设置,在这里可以设置对PSS一些功能指标的判定,感谢@弄香花满衣的建议 -->
<!-- 告警阀值设置,如果需要设置目标值,则直接填入,如果不需要则直接把对应设置设置成0即可 -->
<!-- AlertConnect用于设置连接指标的监控,目前单位时间是120s为单位。 -->
<!-- ConnectMin为单位时间最小连接连接数,Max为最大连接数。DisConnect同理 -->
<!-- ConnectAlert 当PSS的当前连接达到设置的设个上限的时候发送报警邮件 -->
<!-- MailID=0为不发送邮件,只记录,而如果不为0,则会发到下面配置邮箱中 -->
<AlertConnect ConnectMin="0" ConnectMax="0" DisConnectMin="0" DisConnectMax="0" ConnectAlert="20000" MailID="0"/>

<!-- IP连接相关监控,来自某一个固定IP1分钟内连接数量超过一定阀值,会报警 -->
<!-- Timeout是IP封禁时间 -->
<IP IPMax="0" Timeout="300" />

<!-- 单客户端连接接收和发送数据流量监控,判断周期是60秒,单位是字节 -->
<!-- RecvDataMax为1分钟内的最大流量,SendDataMax为1分钟最大发送流量 -->
<ClientData RecvPacketCount="0" RecvDataMax="0" SendPacketCount="0" SendDataMax="0" MailID="0"/>

<!-- 1分钟内,某一个命令的调用次数最大阀值,配置可以是多个,也可以一个都不配置 -->
<CommandInfo CommandID="4096" CommandCount="0" MailID="0"/>

<!-- 配置邮件告警功能 MailID必须大于0,可以支持多个 -->
<Mail MailID="1" fromMailAddr="freeeyes@163.com" toMailAddr="freeeyes@163.com" MailPass="123456" MailUrl="smtps://smtp.163.com" MailPort="465" />

<!-- 设置指定信令超时时间,单位是毫秒 -->
<CommandTimeout CommandID = "4096" Timeout="500" />
</config>
4 changes: 4 additions & 0 deletions Build/Linux/Linux_Bin/forbiddenIP.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<Config>
<!-- <ForbiddenIP ip="10.1.1.12" type="TCP" desc="examples" /> -->
</Config>
9 changes: 9 additions & 0 deletions Build/Linux/Linux_Bin/killp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
. ${HOME}/.bash_profile

ps -ef|grep $LOGNAME | grep -w $1 |grep -v pts| grep -v killp|awk '{print $2}'|while read tt
do
echo "killed $tt"
kill $tt
done
#ps -ef|grep $LOGNAME|grep $1|grep -v grep|awk '{print $2}'|xargs kill -9
Loading