Skip to content

Commit 680d307

Browse files
authored
Merge pull request #15 from libxengine/develop
V3.4.0.1001 Merge
2 parents 50c47dd + 2fbdc2b commit 680d307

Some content is hidden

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

55 files changed

+1728
-119
lines changed

CHANGELOG

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
XEngine_Authorize V3.4.0.1001
2+
3+
添加:windows窗口特效类
4+
添加:为管理程序增加提示窗口
5+
添加:黑名单功能,支持IP和用户名,支持删除,插入,查询
6+
修改:token登录现在必须设置设备类型
7+
修改:数据库表名称
8+
修改:现在数据库初始化不在创建数据库了
9+
修正:修改用户取消功能不生效的问题
10+
11+
added:window effects class
12+
added:tips window for management program
13+
added:black list function
14+
modify:must set device type for token login
15+
modify:database table name
16+
modify:does not create table when sql init
17+
fixed:modify user info cancel does not work
18+
======================================================================================
119
XEngine_Authorize V3.3.0.1001
220

321
增加:自定义序列号导入和导出

README.en.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ feature list:
4040
12. support http management api function,you can write web page to implement network authorize management interface by self
4141
13. support third user verification interface
4242
14. support distributed verification authorize function
43+
15. black list management
4344

4445
## install
4546

4647
#### XEngine Evn
47-
you must install XEngine,need V7.38 or above,install XEngine can be refer to xengine Readme docment
48+
you must install XEngine,need V7.46 or above,install XEngine can be refer to xengine Readme docment
4849
GITEE:https://gitee.com/xyry/libxengine
4950
GITHUB:https://github.com/libxengine/xengine
5051

@@ -73,8 +74,19 @@ make complie
7374
make FLAGS=InstallAll Install File
7475
make FLAGS=CleanAll Clear Complie
7576

77+
## how to use
78+
#### server(management)
79+
Windows:complie complete,copy VSCopy_x86 or VSCopy_x64 to your complie dir,should copy depend module when execution complete,and copy XEngine_Release dir all file to complie dir
80+
Linux or macos:it can be execution....
81+
82+
#### client
83+
client can be refer XEngine_Apps,and can be refer the docment of protocol,The process should be:register->login->pay->timeout->end.
84+
85+
#### administrator
86+
The program released now comes with an administrator user, user name: admin password: 123123aa, you need to change the password yourself
87+
7688
## test server
77-
address:app.xyry.org or 159.75.200.173
89+
address:app.xyry.org
7890
port :tcp port 5300,websocket port 5301,http management port 5302,Transmission verification password: no encryption
7991

8092
## Screenshot of the program

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ V2可以直接升级到V3版本,因为数据库并没有修改,直接替换程
4040
12. 支持HTTP管理接口,可以自己写前端实现网络验证管理界面
4141
13. 支持第三方用户验证接口
4242
14. 分布式验证授权功能支持
43+
15. 黑名单管理
4344

4445
## 安装教程
4546

4647
#### XEngine环境
47-
必须安装XEngine,版本需要V7.38或者以上版本,安装XEngine可以参考其Readme文档
48+
必须安装XEngine,版本需要V7.46或者以上版本,安装XEngine可以参考其Readme文档
4849
GITEE:https://gitee.com/xyry/libxengine
4950
GITHUB:https://github.com/libxengine/xengine
5051

@@ -73,8 +74,19 @@ make 编译
7374
make FLAGS=InstallAll 安装库程序
7475
make FLAGS=CleanAll 清理编译
7576

77+
## 如何使用
78+
#### 服务端(管理端)
79+
Windows:编译成功后,拷贝VSCopy_x86或者VSCopy_x64 到你的编译目录,执行自动拷贝依赖的模块,然后把XEngine_Release下的文件全部拷贝到编译目录即可
80+
Linux or macos:直接运行即可
81+
82+
#### 客户端
83+
客户端可以参考XEngine_Apps的例子,也可以参考文档的通信协议自己集成到你的客户端,流程应该是:注册->登录->充值->等待超时->结束.
84+
85+
#### 管理员
86+
现在发布的程序自带管理员用户,用户名:admin 密码:123123aa,你需要自己修改密码.
87+
7688
## 测试服务器
77-
地址:app.xyry.org 或者 159.75.200.173
89+
地址:app.xyry.org
7890
端口:tcp端口 5300,websocket端口 5301,http管理端 5302,传输验证密码:无加密
7991

8092
## 程序截图
@@ -108,16 +120,25 @@ V3版本为全新版本,为了适应过多环境要求开发
108120

109121
## 开发计划
110122
mfc转qt界面库(我们需要会Qt的人员加入一起开发)
123+
动态验证码
124+
短信登录,扫码登录
111125
消息公告
112126
支持多端登录
113127
多端登录合并用时
114128
生成会话TOKEN分布式鉴权
129+
token 自动续期
130+
密码加密
131+
关键日志(强日志)
132+
http basic和disgt支持
115133
支持OAuth验证
116134
mysql支持
117135
列表数据分割,用于大型服务器
118136
支持用户和硬件绑定同时验证
119137
支持自定义序列号导入导出
120138
统计用户所有在线时间
121-
黑名单设置(IP,用户)
122-
支持代理端
123-
支持绑定自定义内容
139+
账号封禁与处罚,时间永久
140+
持久层,redis,memcached等支持
141+
支持代理端(序列号分发,权限控制)
142+
支持绑定自定义内容
143+
自动售卡(支付宝,微信)
144+
MQTT协议支持,让你的嵌入式设备也用上授时验证

XEngine_Apps/Authorize_APPClient/Authorize_APPClient.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ int AuthClient_Register()
118118

119119
int nMsgLen = 0;
120120
CHAR* ptszMsgBuffer = NULL;
121-
APIHelp_HttpRequest_Post(lpszUrl, st_JsonRoot.toStyledString().c_str(), &nHTTPCode, &ptszMsgBuffer, &nMsgLen);
121+
APIHelp_HttpRequest_Custom(_T("POST"), lpszUrl, st_JsonRoot.toStyledString().c_str(), &nHTTPCode, &ptszMsgBuffer, &nMsgLen);
122122
printf("AuthClient_Register:\n%s\n", ptszMsgBuffer);
123123
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
124124

@@ -138,7 +138,7 @@ int AuthClient_Pay()
138138

139139
int nMsgLen = 0;
140140
CHAR* ptszMsgBuffer = NULL;
141-
APIHelp_HttpRequest_Post(lpszUrl, st_JsonRoot.toStyledString().c_str(), &nHTTPCode, &ptszMsgBuffer, &nMsgLen);
141+
APIHelp_HttpRequest_Custom(_T("POST"), lpszUrl, st_JsonRoot.toStyledString().c_str(), &nHTTPCode, &ptszMsgBuffer, &nMsgLen);
142142
printf("AuthClient_Pay:\n%s\n", ptszMsgBuffer);
143143
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
144144

@@ -160,7 +160,7 @@ int AuthClient_Login()
160160
st_ProtocolHdr.unPacketSize = sizeof(XENGINE_PROTOCOL_USERAUTH);
161161
st_ProtocolHdr.wTail = XENGIEN_COMMUNICATION_PACKET_PROTOCOL_TAIL;
162162

163-
st_AuthUser.enDeviceType = ENUM_PROTOCOL_FOR_DEVICE_TYPE_PC;
163+
st_AuthUser.enDeviceType = ENUM_PROTOCOL_FOR_DEVICE_TYPE_PC_WINDOWS;
164164
strcpy(st_AuthUser.tszUserName, lpszUser);
165165
strcpy(st_AuthUser.tszUserPass, lpszPass);
166166

@@ -213,7 +213,7 @@ int AuthClient_GetPass()
213213

214214
int nMsgLen = 0;
215215
CHAR* ptszMsgBuffer = NULL;
216-
APIHelp_HttpRequest_Post(lpszUrl, st_JsonRoot.toStyledString().c_str(), &nHTTPCode, &ptszMsgBuffer, &nMsgLen);
216+
APIHelp_HttpRequest_Custom(_T("POST"), lpszUrl, st_JsonRoot.toStyledString().c_str(), &nHTTPCode, &ptszMsgBuffer, &nMsgLen);
217217
printf("AuthClient_GetPass:\n%s\n", ptszMsgBuffer);
218218
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
219219

@@ -232,7 +232,7 @@ int AuthClient_GetTime()
232232

233233
int nMsgLen = 0;
234234
CHAR* ptszMsgBuffer = NULL;
235-
APIHelp_HttpRequest_Post(lpszUrl, st_JsonRoot.toStyledString().c_str(), &nHTTPCode, &ptszMsgBuffer, &nMsgLen);
235+
APIHelp_HttpRequest_Custom(_T("POST"), lpszUrl, st_JsonRoot.toStyledString().c_str(), &nHTTPCode, &ptszMsgBuffer, &nMsgLen);
236236
printf("AuthClient_GetTime:\n%s\n", ptszMsgBuffer);
237237
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
238238

@@ -255,7 +255,7 @@ int AuthClient_Delete()
255255

256256
int nMsgLen = 0;
257257
CHAR* ptszMsgBuffer = NULL;
258-
APIHelp_HttpRequest_Post(lpszUrl, st_JsonRoot.toStyledString().c_str(), &nHTTPCode, &ptszMsgBuffer, &nMsgLen);
258+
APIHelp_HttpRequest_Custom(_T("POST"), lpszUrl, st_JsonRoot.toStyledString().c_str(), &nHTTPCode, &ptszMsgBuffer, &nMsgLen);
259259
printf("AuthClient_Delete:\n%s\n", ptszMsgBuffer);
260260
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
261261

@@ -274,7 +274,7 @@ int AuthClient_Try()
274274

275275
int nMsgLen = 0;
276276
CHAR* ptszMsgBuffer = NULL;
277-
APIHelp_HttpRequest_Post(lpszUrl, st_JsonRoot.toStyledString().c_str(), &nHTTPCode, &ptszMsgBuffer, &nMsgLen);
277+
APIHelp_HttpRequest_Custom(_T("POST"), lpszUrl, st_JsonRoot.toStyledString().c_str(), &nHTTPCode, &ptszMsgBuffer, &nMsgLen);
278278
printf("AuthClient_Try:\n%s\n", ptszMsgBuffer);
279279
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
280280

XEngine_Apps/VSCopy_x86.bat

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_BaseLib.dll" "./"
2+
copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_Algorithm.dll" "./"
3+
copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_OPenSsl.dll" "./"
4+
5+
copy /y "%XEngine_Lib32%\XEngine_Client\XClient_Socket.dll" "./"
6+
7+
copy /y "%XEngine_Lib32%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./"
8+
copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
9+
10+
copy /y "%XEngine_Lib32%\XEngine_HelpComponents\zlib1.dll" "./"
11+
copy /y "%XEngine_Lib32%\XEngine_LibEx\libcrypto-3.dll" "./"
12+
copy /y "%XEngine_Lib32%\XEngine_LibEx\libssl-3.dll" "./"
13+
copy /y "%XEngine_Lib32%\XEngine_LibEx\libcurl.dll" "./"
14+
copy /y "%XEngine_Lib32%\XEngine_LibEx\nghttp2.dll" "./"

XEngine_Docment/Docment_en.docx

2.38 KB
Binary file not shown.

XEngine_Docment/Docment_zh.docx

2.64 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.4.0.1001 Build20221230",
4849
"V3.3.0.1001 Build20221101",
4950
"V3.2.0.1001 Build20220923",
5051
"V3.1.0.1001 Build20220826",
28 KB
Binary file not shown.

XEngine_SQL/main.sql

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
/*
2+
Navicat Premium Data Transfer
3+
4+
Source Server : authorize
5+
Source Server Type : SQLite
6+
Source Server Version : 3035005 (3.35.5)
7+
Source Schema : main
8+
9+
Target Server Type : SQLite
10+
Target Server Version : 3035005 (3.35.5)
11+
File Encoding : 65001
12+
13+
Date: 29/12/2022 13:14:11
14+
*/
15+
16+
PRAGMA foreign_keys = false;
17+
18+
-- ----------------------------
19+
-- Table structure for Authorize_BannedAddr
20+
-- ----------------------------
21+
DROP TABLE IF EXISTS "Authorize_BannedAddr";
22+
CREATE TABLE "Authorize_BannedAddr" (
23+
"ID" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
24+
"tszIPStart" TEXT,
25+
"tszIPEnd" TEXT,
26+
"tszCreateTime" DATE NOT NULL
27+
);
28+
29+
-- ----------------------------
30+
-- Records of Authorize_BannedAddr
31+
-- ----------------------------
32+
33+
-- ----------------------------
34+
-- Table structure for Authorize_BannedUser
35+
-- ----------------------------
36+
DROP TABLE IF EXISTS "Authorize_BannedUser";
37+
CREATE TABLE "Authorize_BannedUser" (
38+
"ID" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
39+
"tszUserName" TEXT,
40+
"tszCreateTime" DATE NOT NULL
41+
);
42+
43+
-- ----------------------------
44+
-- Records of Authorize_BannedUser
45+
-- ----------------------------
46+
47+
-- ----------------------------
48+
-- Table structure for Authorize_NetVer
49+
-- ----------------------------
50+
DROP TABLE IF EXISTS "Authorize_NetVer";
51+
CREATE TABLE "Authorize_NetVer" (
52+
"ID" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
53+
"VerSerial" TEXT NOT NULL,
54+
"VerMode" integer NOT NULL,
55+
"TryTime" integer NOT NULL,
56+
"CreateTime" TEXT NOT NULL
57+
);
58+
59+
-- ----------------------------
60+
-- Records of Authorize_NetVer
61+
-- ----------------------------
62+
63+
-- ----------------------------
64+
-- Table structure for Authorize_Serial
65+
-- ----------------------------
66+
DROP TABLE IF EXISTS "Authorize_Serial";
67+
CREATE TABLE "Authorize_Serial" (
68+
"ID" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
69+
"UserName" TEXT,
70+
"SerialNumber" TEXT,
71+
"MaxTime" TEXT,
72+
"CardSerialType" integer,
73+
"bIsUsed" boolean,
74+
"CreateTime" TEXT NOT NULL
75+
);
76+
77+
-- ----------------------------
78+
-- Records of Authorize_Serial
79+
-- ----------------------------
80+
81+
-- ----------------------------
82+
-- Table structure for Authorize_User
83+
-- ----------------------------
84+
DROP TABLE IF EXISTS "Authorize_User";
85+
CREATE TABLE "Authorize_User" (
86+
"ID" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
87+
"UserName" TEXT,
88+
"Password" TEXT,
89+
"LeftTime" TEXT,
90+
"EmailAddr" TEXT,
91+
"HardCode" TEXT,
92+
"CardSerialType" integer,
93+
"PhoneNumber" integer,
94+
"IDCard" integer,
95+
"nUserLevel" integer,
96+
"CreateTime" TEXT NOT NULL
97+
);
98+
99+
-- ----------------------------
100+
-- Records of Authorize_User
101+
-- ----------------------------
102+
INSERT INTO "Authorize_User" VALUES (1, 'admin', '123123aa', '5', '[email protected]', 'DAFD2A2DAD', 1, 13699430000, 511025198881118888, 0, '2022-09-21 15:06:45');
103+
104+
-- ----------------------------
105+
-- Table structure for sqlite_sequence
106+
-- ----------------------------
107+
DROP TABLE IF EXISTS "sqlite_sequence";
108+
CREATE TABLE "sqlite_sequence" (
109+
"name",
110+
"seq"
111+
);
112+
113+
-- ----------------------------
114+
-- Records of sqlite_sequence
115+
-- ----------------------------
116+
INSERT INTO "sqlite_sequence" VALUES ('Authorize_User', 1);
117+
118+
-- ----------------------------
119+
-- Auto increment value for Authorize_User
120+
-- ----------------------------
121+
UPDATE "sqlite_sequence" SET seq = 1 WHERE name = 'Authorize_User';
122+
123+
PRAGMA foreign_keys = true;

0 commit comments

Comments
 (0)