Skip to content

Commit

Permalink
Merge pull request #21 from libxengine/develop
Browse files Browse the repository at this point in the history
V3.9.0.1001 Merge
  • Loading branch information
xengine-qyt authored Nov 10, 2023
2 parents 2395033 + b1c20a3 commit 4f66d65
Show file tree
Hide file tree
Showing 23 changed files with 217 additions and 127 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
XEngine_Authorize V3.9.0.1001

优化:管理程序的用户列表刷新代码
优化:会话模块的秒钟时间统计方法
修改:多端登录可以不限制登录设备类型了
修改:分钟时间修改为秒钟,时间更加精准
修改:管理程序展示所有用户级别了
修改:当启动失败后服务需要按下按钮关闭
修改:自定义卡和天数卡背分开处理了
修改:秒钟时间类型现在展示的剩余时间了
修改:加密传输的启动日志
修改:多端登录的类型判断支持
修复:注册协议设置用户级别和时间错误
删除:管理程序添加用户的时候没用的代码

improved:user list flush for app
improved:time second count way for sessoion module
modify:does not limit login type for mutil login
modify:minute time modified to second time,Timing is more accurate
modify:show all user level for management app
modify:button push key for close service when service start is failed
modify:custom and day type handle separately
modify:second time type show left time and not left date
modify:crypto transport start log
modify:Mulit Login type handle is supported
fixed:register protocol set user level and time is incorrent
delete:unused when add user for manage app
================================================================
XEngine_Authorize V3.8.0.1001

添加:管理端用户地址列表支持
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ V2可以直接升级到V3版本,因为数据库并没有修改,直接替换程
14. 分布式验证授权功能支持
15. 黑名单管理
16. 本地cdkey生成验证支持
17. 支持功公告管理
17. 支持公告管理
18. 支持动态验证码登录
19. 支持多端登录和合并用时

Expand Down
Binary file modified XEngine_Apps/Authorize_APPClient.e
Binary file not shown.
2 changes: 1 addition & 1 deletion XEngine_Apps/Authorize_APPClient/Authorize_APPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ int main()
AuthClient_GetPass();
AuthClient_GetTime();

std::this_thread::sleep_for(std::chrono::seconds(60));
std::this_thread::sleep_for(std::chrono::seconds(600));
AuthClient_Delete();
AuthClient_Try();

Expand Down
Binary file modified XEngine_Docment/Docment_en.docx
Binary file not shown.
Binary file modified XEngine_Docment/Docment_zh.docx
Binary file not shown.
61 changes: 54 additions & 7 deletions XEngine_Release/XEngine_Config/HttpCode.types
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
100:HTTP/1.1 100 Continue
101:HTTP/1.1 101 Switching Protocols
102:HTTP/1.1 102 Processing
103:HTTP/1.1 103 Early Hints
110:HTTP/1.1 110 (obsoleted) Response is Stale
111:HTTP/1.1 111 (obsoleted) Revalidation Failed
112:HTTP/1.1 112 (obsoleted) Disconnected Operation
113:HTTP/1.1 113 (obsoleted) Heuristic Expiration
199:HTTP/1.1 199 (obsoleted) Miscellaneous Warning
//CodeSuccess
200:HTTP/1.1 200 OK
201:HTTP/1.1 201 Created
Expand All @@ -10,18 +16,25 @@
204:HTTP/1.1 204 No Content
205:HTTP/1.1 205 Reset Content
206:HTTP/1.1 206 Partial Content
207:HTTP/1.1 207 Multi-Status
208:HTTP/1.1 208 Already Reported
214:HTTP/1.1 214 (obsoleted) Transformation Applied
226:HTTP/1.1 226 IM Used
299:HTTP/1.1 299 (obsoleted) Miscellaneous Persistent Warning
//CodeRedirect
300:HTTP/1.1 300 Multiple Choices
301:HTTP/1.1 301 Moved Permanently
302:HTTP/1.1 302 Move temporarily
302:HTTP/1.1 302 Moved temporarily
303:HTTP/1.1 303 See Other
304:HTTP/1.1 304 Not Modified
305:HTTP/1.1 305 Use Proxy
306:HTTP/1.1 306 Switch Proxy
307:HTTP/1.1 307 Temporary Redirect
308:HTTP/1.1 308 Permanent Redirect
//CodeRequestFail
400:HTTP/1.1 400 Bad Request
401:HTTP/1.1 401 Payment Required
402:HTTP/1.1 402 Unauthorized
401:HTTP/1.1 401 Unauthorized
402:HTTP/1.1 402 Payment Required
403:HTTP/1.1 403 Forbidden
404:HTTP/1.1 404 Not Found
405:HTTP/1.1 405 Method Not Allowed
Expand All @@ -37,14 +50,32 @@
415:HTTP/1.1 415 Unsupported Media Type
416:HTTP/1.1 416 Requested Range Not Satisfiable
417:HTTP/1.1 417 Expectation Failed
418:HTTP/1.1 418 I'm a teapot
419:HTTP/1.1 419 (Unofficial) Page Expired
420:HTTP/1.1 420 (Unofficial) Method Failure
421:HTTP/1.1 421 too many connections
422:HTTP/1.1 422 Unprocessable Entity
423:HTTP/1.1 423 Locked
424:HTTP/1.1 424 Failed Dependency
425:HTTP/1.1 425 Unordered Collection
426:HTTP/1.1 426 Upgrade Required
449:HTTP/1.1 449 Retry With
451:HTTP/1.1 451 Unavailable For Legal Reasons
428:HTTP/1.1 428 Precondition Required
429:HTTP/1.1 429 Too Many Requests
430:HTTP/1.1 430 (Unofficial) Request Header Fields Too Large
431:HTTP/1.1 431 Request Header Fields Too Large
440:HTTP/1.1 440 (IIS) Login Time-out
444:HTTP/1.1 444 (nginx) No Response
449:HTTP/1.1 449 (IIS) Retry With
450:HTTP/1.1 450 (Unofficial) Blocked by Windows Parental Controls
451:HTTP/1.1 451 (IIS) Redirect
460:HTTP/1.1 460 (AWS)
463:HTTP/1.1 463 (AWS)
494:HTTP/1.1 494 (nginx) Request header too large
495:HTTP/1.1 495 (nginx) SSL Certificate Error
496:HTTP/1.1 496 (nginx) SSL Certificate Required
497:HTTP/1.1 497 (nginx) HTTP Request Sent to HTTPS Port
498:HTTP/1.1 498 (Unofficial) Invalid Token
499:HTTP/1.1 499 (nginx) Token Required
//CodeServerFail
500:HTTP/1.1 500 Internal Server Error
501:HTTP/1.1 501 Not Implemented
Expand All @@ -54,8 +85,24 @@
505:HTTP/1.1 505 HTTP Version Not Supported
506:HTTP/1.1 506 Variant Also Negotiates
507:HTTP/1.1 507 Insufficient Storage
508:HTTP/1.1 509 Bandwidth Limit Exceeded
508:HTTP/1.1 508 Loop Detected
509:HTTP/1.1 509 (Unofficial) Bandwidth Limit Exceeded
510:HTTP/1.1 510 Not Extended
511:HTTP/1.1 511 Network Authentication Required
520:HTTP/1.1 520 (Cloudflare) Web Server Returned an Unknown Error
521:HTTP/1.1 521 (Cloudflare) Web Server Is Down
522:HTTP/1.1 522 (Cloudflare) Connection Timed Out
523:HTTP/1.1 523 (Cloudflare) Origin Is Unreachable
524:HTTP/1.1 524 (Cloudflare) A Timeout Occurred
525:HTTP/1.1 525 (Cloudflare) SSL Handshake Failed
526:HTTP/1.1 526 (Cloudflare) Invalid SSL Certificate
527:HTTP/1.1 527 (Cloudflare) Railgun Error
529:HTTP/1.1 529 (Unofficial) Site is overloaded
530:HTTP/1.1 530 (Cloudflare) Site is frozen
561:HTTP/1.1 561 (AWS) Unauthorized
598:HTTP/1.1 598 (Unofficial) Network read timeout error
599:HTTP/1.1 599 (Unofficial) Network Connect Timeout Error
600:HTTP/1.1 600 Unparseable Response Headers
//CodeUser
//XEngine Code
1001:HTTP/1.1 1001 XEngine Auth Ok
1002:HTTP/1.1 1002 XEngine Auth Failed
52 changes: 31 additions & 21 deletions XEngine_Release/XEngine_Config/HttpMime.types
Original file line number Diff line number Diff line change
@@ -1,42 +1,56 @@
text/html html htm shtml
text/css css
text/xml xml
image/gif gif
image/jpeg jpeg jpg
application/javascript js
application/atom+xml atom
application/rss+xml rss

text/mathml mml
text/plain txt
text/vnd.sun.j2me.app-descriptor jad
text/vnd.wap.wml wml
text/x-component htc

image/gif gif
image/jpeg jpeg jpg
image/avif avif
image/png png
image/tiff tif tiff
image/webp webp
image/vnd.wap.wbmp wbmp
image/svg+xml svg svgz
image/x-icon ico
image/x-jng jng
image/x-ms-bmp bmp
image/svg+xml svg svgz
image/webp webp

application/font-woff woff
font/woff woff
font/woff2 woff2

application/pdf pdf

application/vnd.google-earth.kml+xml kml
application/vnd.google-earth.kmz kmz

application/msword doc
application/vnd.ms-excel xls
application/vnd.ms-powerpoint ppt
application/vnd.ms-fontobject eot
application/vnd.oasis.opendocument.graphics odg
application/vnd.oasis.opendocument.presentation odp
application/vnd.oasis.opendocument.spreadsheet ods
application/vnd.oasis.opendocument.text odt
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx

application/javascript js
application/atom+xml atom
application/rss+xml rss
application/java-archive jar war ear
application/json json
application/mac-binhex40 hqx
application/msword doc
application/pdf pdf
application/postscript ps eps ai
application/rtf rtf
application/vnd.apple.mpegurl m3u8
application/vnd.ms-excel xls
application/vnd.ms-fontobject eot
application/vnd.ms-powerpoint ppt
application/vnd.wap.wmlc wmlc
application/vnd.google-earth.kml+xml kml
application/vnd.google-earth.kmz kmz
application/wasm wasm

application/x-7z-compressed 7z
application/x-cocoa cco
application/x-java-archive-diff jardiff
Expand All @@ -62,10 +76,6 @@ application/octet-stream dmg
application/octet-stream iso img
application/octet-stream msi msp msm

application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx

audio/midi mid midi kar
audio/mpeg mp3
audio/ogg ogg
Expand All @@ -83,4 +93,4 @@ video/x-m4v m4v
video/x-mng mng
video/x-ms-asf asx asf
video/x-ms-wmv wmv
video/x-msvideo avi
video/x-msvideo avi
9 changes: 5 additions & 4 deletions XEngine_Release/XEngine_Config/XEngine_Config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"nWSPort":5301,
"nHTTPPort":5302,
"bDeamon":false,
"bTimeNotify":true,
"bTimeNotify":false,
"XMax":{
"nMaxClient":10000,
"nMaxQueue":10000,
Expand All @@ -25,17 +25,17 @@
"bHTTPAuth":false,
"bPassAuth":false,
"nHTTPAuthTime":10,
"nMultiMode":0,
"nMultiMode":2,
"st_PassUrl":{
"tszPassLogin":"http://127.0.0.1:5303/auth/pass/login",
"tszPassLogout":"http://127.0.0.1:5303/auth/pass/logout",
"tszPassTimeout":"http://127.0.0.1:5303/auth/pass/timeout"
},
"st_MulitLogin":{
"bMinute":true,
"bSecond":true,
"bDay":true,
"bTime":true,
"bCustom":true
"bCustom":false
}
},
"XCrypto":{
Expand All @@ -52,6 +52,7 @@
"LogLeave":32
},
"XVer":[
"V3.9.0.1001 Build20231110",
"V3.8.0.1001 Build20230811",
"V3.7.0.1001 Build20230421",
"V3.6.0.1001 Build20230224",
Expand Down
2 changes: 1 addition & 1 deletion XEngine_Release/XEngine_Config/XEngine_SwitchConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"bSwitchCDKey":true,
"bSwitchNotice":true,
"bSwitchDCode":false,
"bSwitchMulti":false
"bSwitchMulti":true
}
2 changes: 1 addition & 1 deletion XEngine_Source/AuthorizeModule_Configure/Config_Define.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ typedef struct
//多端登录支持的计时方式
struct
{
bool bMinute;
bool bSecond;
bool bDay;
bool bTime;
bool bCustom;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE
Json::Value st_JsonMulitLogin = st_JsonXLogin["st_MulitLogin"];
pSt_ServerConfig->st_XLogin.st_MulitLogin.bCustom = st_JsonMulitLogin["bCustom"].asBool();
pSt_ServerConfig->st_XLogin.st_MulitLogin.bDay = st_JsonMulitLogin["bDay"].asBool();
pSt_ServerConfig->st_XLogin.st_MulitLogin.bMinute = st_JsonMulitLogin["bMinute"].asBool();
pSt_ServerConfig->st_XLogin.st_MulitLogin.bSecond = st_JsonMulitLogin["bSecond"].asBool();
pSt_ServerConfig->st_XLogin.st_MulitLogin.bTime = st_JsonMulitLogin["bTime"].asBool();
//加密配置
if (st_JsonRoot["XCrypto"].empty() || (2 != st_JsonRoot["XCrypto"].size()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ bool CDatabase_SQLite::Database_SQLite_UserPay(LPCXSTR lpszUserName, LPCXSTR lps
//分析插入方式
switch (st_SerialTable.enSerialType)
{
case ENUM_HELPCOMPONENTS_AUTHORIZE_SERIAL_TYPE_MINUTE:
case ENUM_HELPCOMPONENTS_AUTHORIZE_SERIAL_TYPE_SECOND:
if (!Database_SQLite_UserPayTime(lpszUserName, st_UserTable.tszLeftTime, st_SerialTable.tszMaxTime, st_SerialTable.enSerialType, st_UserTable.enSerialType))
{
return false;
Expand Down Expand Up @@ -338,7 +338,7 @@ bool CDatabase_SQLite::Database_SQLite_UserLeave(AUTHREG_PROTOCOL_TIME* pSt_Time
_xstprintf(tszSQLStatement, _X("UPDATE Authorize_User SET LeftTime = '0' WHERE UserName = '%s'"), pSt_TimeProtocol->tszUserName);
}
}
if (ENUM_HELPCOMPONENTS_AUTHORIZE_SERIAL_TYPE_MINUTE == pSt_TimeProtocol->enSerialType)
if (ENUM_HELPCOMPONENTS_AUTHORIZE_SERIAL_TYPE_SECOND == pSt_TimeProtocol->enSerialType)
{
//分钟卡必须要有在线时间才能计算
if (pSt_TimeProtocol->nTimeLeft <= 0)
Expand Down Expand Up @@ -523,9 +523,9 @@ bool CDatabase_SQLite::Database_SQLite_SerialInsert(LPCXSTR lpszSerialNumber)
{
return false;
}
if (ENUM_HELPCOMPONENTS_AUTHORIZE_SERIAL_TYPE_MINUTE == enAuthSerialType)
if (ENUM_HELPCOMPONENTS_AUTHORIZE_SERIAL_TYPE_SECOND == enAuthSerialType)
{
_xstprintf(tszSQLStatement, _X("INSERT INTO Authorize_Serial values(NULL,'NOT','%s','%d','%d',0,datetime('now', 'localtime'))"), lpszSerialNumber, st_AuthTimer.wMinute, enAuthSerialType);
_xstprintf(tszSQLStatement, _X("INSERT INTO Authorize_Serial values(NULL,'NOT','%s','%d','%d',0,datetime('now', 'localtime'))"), lpszSerialNumber, st_AuthTimer.wSecond, enAuthSerialType);
}
else if (ENUM_HELPCOMPONENTS_AUTHORIZE_SERIAL_TYPE_DAY == enAuthSerialType)
{
Expand Down Expand Up @@ -1645,7 +1645,7 @@ bool CDatabase_SQLite::Database_SQLite_UserPayTime(LPCXSTR lpszUserName, LPCXSTR
//处理卡类型
switch (en_AuthSerialType)
{
case ENUM_HELPCOMPONENTS_AUTHORIZE_SERIAL_TYPE_MINUTE:
case ENUM_HELPCOMPONENTS_AUTHORIZE_SERIAL_TYPE_SECOND:
{
//如果是分钟卡
//如果当前的充值卡类型不匹配,那么他以前的充值内容全部都会被删除!
Expand Down Expand Up @@ -1704,7 +1704,7 @@ bool CDatabase_SQLite::Database_SQLite_UserPayTime(LPCXSTR lpszUserName, LPCXSTR
{
switch (en_AuthSerialType)
{
case ENUM_HELPCOMPONENTS_AUTHORIZE_SERIAL_TYPE_MINUTE:
case ENUM_HELPCOMPONENTS_AUTHORIZE_SERIAL_TYPE_SECOND:
{
int nCardTime = _ttxoi(lpszCardTime);
nCardTime += _ttxoi(lpszUserTime); //我们把用户以前的时间也加上
Expand Down
Loading

0 comments on commit 4f66d65

Please sign in to comment.