Skip to content

Commit 50c47dd

Browse files
authored
Merge pull request #14 from libxengine/develop
V3.3.0.1001 Merge
2 parents 991f6ec + a33043b commit 50c47dd

File tree

60 files changed

+1443
-140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1443
-140
lines changed

CHANGELOG

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
XEngine_Authorize V3.3.0.1001
2+
3+
增加:自定义序列号导入和导出
4+
增加:功能开关支持(注册,登录,删除,充值,获取时间,找回密码)
5+
修改:支持TCP,WEBSOCEKT,HTTP功能开关
6+
修改:客户端和序列号查询支持设置起始和结束位置
7+
更新:匹配XEngine V7.42
8+
删除:不需要的HTTPGET负载参数
9+
10+
added:custom serial number export and import
11+
added:functions switch support(register,login,delete,pay,get time,get pass)
12+
modify:support tcp and websocket and http function switch
13+
modify:client and serial query supported set start and end pos
14+
update:match xengine v7.42
15+
delete:not need parament for http get
16+
======================================================================================
117
XEngine_Authorize V3.2.0.1001
218

319
增加:为管理程序增加用户注册功能

README.en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ port :tcp port 5300,websocket port 5301,http management port 5302,Transmission v
8282
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/2.png "在这里输入图片标题")
8383
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/3.png "在这里输入图片标题")
8484
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/4.png "在这里输入图片标题")
85+
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/5.png "在这里输入图片标题")
8586

8687
## Participate in contribution
8788

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ make FLAGS=CleanAll 清理编译
8282
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/2.png "在这里输入图片标题")
8383
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/3.png "在这里输入图片标题")
8484
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/4.png "在这里输入图片标题")
85+
![输入图片说明](https://www.xyry.org/XEngine_StructPic/authorize/5.png "在这里输入图片标题")
8586

8687
## 参与贡献
8788

@@ -106,14 +107,17 @@ V3版本为全新版本,为了适应过多环境要求开发
106107
如果你有问题,可以在issues中提交
107108

108109
## 开发计划
109-
功能启用关闭(注册,登录,等)
110110
mfc转qt界面库(我们需要会Qt的人员加入一起开发)
111+
消息公告
111112
支持多端登录
112113
多端登录合并用时
113114
生成会话TOKEN分布式鉴权
114115
支持OAuth验证
115116
mysql支持
116117
列表数据分割,用于大型服务器
117118
支持用户和硬件绑定同时验证
118-
支持自定义序列号插入导入
119-
统计用户所有在线时间
119+
支持自定义序列号导入导出
120+
统计用户所有在线时间
121+
黑名单设置(IP,用户)
122+
支持代理端
123+
支持绑定自定义内容

XEngine_Docment/Docment_en.docx

1.54 KB
Binary file not shown.

XEngine_Docment/Docment_zh.docx

2.01 KB
Binary file not shown.

XEngine_Release/XEngine_Config/XEngine_Config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"LogLeave":32
4646
},
4747
"XVer":[
48+
"V3.3.0.1001 Build20221101",
4849
"V3.2.0.1001 Build20220923",
4950
"V3.1.0.1001 Build20220826",
5051
"V3.0.0.1001 Build20220816",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"bSwitchDelete":true,
3+
"bSwitchRegister":true,
4+
"bSwitchLogin":true,
5+
"bSwitchPay":true,
6+
"bSwitchPass":true,
7+
"bSwtichTime":true
8+
}

XEngine_Source/AuthorizeModule_Configure/AuthorizeModule_Configure.def

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ LIBRARY
33
EXPORTS
44
Config_GetLastError
55

6-
ModuleConfigure_Json_File
6+
ModuleConfigure_Json_File
7+
ModuleConfigure_Json_Switch

XEngine_Source/AuthorizeModule_Configure/Config_Define.h

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,22 @@ typedef struct
6666
int nMaxSize; //最大大小
6767
int nMaxCount; //备份个数
6868
int nLogLeave; //日志级别
69-
}st_XLog;
69+
}st_XLog;
7070
struct
7171
{
7272
list<string> *pStl_ListVer;
7373
}st_XVer;
7474
}XENGINE_SERVICECONFIG;
75+
//功能开关
76+
typedef struct
77+
{
78+
BOOL bSwitchDelete; //删除开关
79+
BOOL bSwitchRegister; //注册开关
80+
BOOL bSwitchLogin; //登录开关
81+
BOOL bSwitchPay; //充值开关
82+
BOOL bSwitchPass; //找回密码开关
83+
BOOL bSwtichTime; //计时开关,关闭后客户端不会消耗时间(仅分钟卡有效)
84+
}XENGINE_FUNCTIONSWITCH;
7585
//////////////////////////////////////////////////////////////////////////
7686
// 导出的函数
7787
//////////////////////////////////////////////////////////////////////////
@@ -97,4 +107,23 @@ extern "C" DWORD Config_GetLastError(int* pInt_SysError = NULL);
97107
意思:是否成功
98108
备注:
99109
*********************************************************************/
100-
extern "C" BOOL ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVICECONFIG * pSt_ServerConfig);
110+
extern "C" BOOL ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVICECONFIG * pSt_ServerConfig);
111+
/********************************************************************
112+
函数名称:ModuleConfigure_Json_Switch
113+
函数功能:功能开关配置文件
114+
参数.一:lpszFile
115+
In/Out:In
116+
类型:常量字符指针
117+
可空:N
118+
意思:输入配置文件位置
119+
参数.二:pSt_AuthConfig
120+
In/Out:Out
121+
类型:数据结构指针
122+
可空:N
123+
意思:输出读取到的配置信息
124+
返回值
125+
类型:逻辑型
126+
意思:是否成功
127+
备注:
128+
*********************************************************************/
129+
extern "C" BOOL ModuleConfigure_Json_Switch(LPCTSTR lpszConfigFile, XENGINE_FUNCTIONSWITCH * pSt_ServerConfig);

XEngine_Source/AuthorizeModule_Configure/ModuleConfigure_Json/ModuleConfigure_Json.cpp

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,5 +181,73 @@ BOOL CModuleConfigure_Json::ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XE
181181
{
182182
pSt_ServerConfig->st_XVer.pStl_ListVer->push_back(st_JsonXVer[i].asCString());
183183
}
184+
return TRUE;
185+
}
186+
/********************************************************************
187+
函数名称:ModuleConfigure_Json_Switch
188+
函数功能:功能开关配置文件
189+
参数.一:lpszFile
190+
In/Out:In
191+
类型:常量字符指针
192+
可空:N
193+
意思:输入配置文件位置
194+
参数.二:pSt_AuthConfig
195+
In/Out:Out
196+
类型:数据结构指针
197+
可空:N
198+
意思:输出读取到的配置信息
199+
返回值
200+
类型:逻辑型
201+
意思:是否成功
202+
备注:
203+
*********************************************************************/
204+
BOOL CModuleConfigure_Json::ModuleConfigure_Json_Switch(LPCTSTR lpszConfigFile, XENGINE_FUNCTIONSWITCH* pSt_ServerConfig)
205+
{
206+
Config_IsErrorOccur = FALSE;
207+
208+
if ((NULL == lpszConfigFile) || (NULL == pSt_ServerConfig))
209+
{
210+
Config_IsErrorOccur = TRUE;
211+
Config_dwErrorCode = ERROR_AUTHORIZE_MODULE_CONFIGURE_PARAMENT;
212+
return FALSE;
213+
}
214+
Json::Value st_JsonRoot;
215+
JSONCPP_STRING st_JsonError;
216+
Json::CharReaderBuilder st_JsonBuilder;
217+
//读取配置文件所有内容到缓冲区
218+
FILE* pSt_File = _tfopen(lpszConfigFile, _T("rb"));
219+
if (NULL == pSt_File)
220+
{
221+
Config_IsErrorOccur = TRUE;
222+
Config_dwErrorCode = ERROR_AUTHORIZE_MODULE_CONFIGURE_OPENFILE;
223+
return FALSE;
224+
}
225+
size_t nCount = 0;
226+
TCHAR tszMsgBuffer[4096];
227+
while (1)
228+
{
229+
size_t nRet = fread(tszMsgBuffer + nCount, 1, 2048, pSt_File);
230+
if (nRet <= 0)
231+
{
232+
break;
233+
}
234+
nCount += nRet;
235+
}
236+
fclose(pSt_File);
237+
//开始解析配置文件
238+
std::unique_ptr<Json::CharReader> const pSt_JsonReader(st_JsonBuilder.newCharReader());
239+
if (!pSt_JsonReader->parse(tszMsgBuffer, tszMsgBuffer + nCount, &st_JsonRoot, &st_JsonError))
240+
{
241+
Config_IsErrorOccur = TRUE;
242+
Config_dwErrorCode = ERROR_AUTHORIZE_MODULE_CONFIGURE_PARSE;
243+
return FALSE;
244+
}
245+
pSt_ServerConfig->bSwitchDelete = st_JsonRoot["bSwitchDelete"].asBool();
246+
pSt_ServerConfig->bSwitchRegister = st_JsonRoot["bSwitchRegister"].asBool();
247+
pSt_ServerConfig->bSwitchLogin = st_JsonRoot["bSwitchLogin"].asBool();
248+
pSt_ServerConfig->bSwitchPay = st_JsonRoot["bSwitchPay"].asBool();
249+
pSt_ServerConfig->bSwitchPass = st_JsonRoot["bSwitchPass"].asBool();
250+
pSt_ServerConfig->bSwtichTime = st_JsonRoot["bSwtichTime"].asBool();
251+
184252
return TRUE;
185253
}

0 commit comments

Comments
 (0)