Skip to content

Commit a4a4a17

Browse files
authored
Merge pull request #74 from libxengine/develop
V3.14.0.1001 Merge
2 parents f0b3b3e + 4a14600 commit a4a4a17

File tree

62 files changed

+746
-318
lines changed

Some content is hidden

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

62 files changed

+746
-318
lines changed

.github/workflows/linuxbuild.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: ubuntu build workflows
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
strategy:
15+
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- os: ubuntu-22.04
20+
#- os: ubuntu-24.04
21+
runs-on: ${{ matrix.os }}
22+
23+
steps:
24+
# 检出您的主仓库代码
25+
- name: Checkout main repository code
26+
uses: actions/checkout@v4
27+
with:
28+
ref: 'develop'
29+
30+
# 检出依赖的xengine仓库到指定的xengine目录
31+
- name: Checkout dependency repository (xengine)
32+
uses: actions/checkout@v4
33+
with:
34+
repository: libxengine/libxengine
35+
path: libxengine
36+
37+
- name: sub module checkout (opensource)
38+
run: |
39+
git submodule init
40+
git submodule update
41+
42+
# 设置依赖库的环境变量
43+
- name: Set up Dependency Environment Variables
44+
run: |
45+
cd libxengine
46+
chmod 777 *
47+
sudo ./XEngine_LINEnv.sh -i 3
48+
cd ..
49+
#编译
50+
- name: make
51+
run: |
52+
cd XEngine_Source
53+
make
54+
make FLAGS=InstallAll
55+
make FLAGS=CleanAll
56+
57+
make RELEASE=1
58+
make FLAGS=InstallAll
59+
make FLAGS=CleanAll
60+
cd ..
61+
- name: test
62+
run: |
63+
cd XEngine_Release
64+
./XEngine_AuthorizeService -t

.github/workflows/macbuild.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: macos build workflows
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
strategy:
15+
matrix:
16+
include:
17+
- os: macos-13
18+
runs-on: ${{ matrix.os }}
19+
20+
steps:
21+
- name: Checkout main repository code
22+
uses: actions/checkout@v4
23+
with:
24+
ref: 'develop'
25+
26+
# 检出依赖的xengine仓库到指定的xengine目录
27+
- name: Checkout dependency repository (xengine)
28+
uses: actions/checkout@v4
29+
with:
30+
repository: libxengine/libxengine
31+
path: libxengine
32+
33+
- name: sub module checkout (opensource)
34+
run: |
35+
git submodule init
36+
git submodule update
37+
38+
- name: brew install
39+
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
40+
41+
# 设置依赖库的环境变量
42+
- name: Set up Dependency Environment Variables
43+
run: |
44+
cd libxengine
45+
chmod 777 *
46+
./XEngine_LINEnv.sh -i 3
47+
cd ..
48+
#编译
49+
- name: make debug
50+
run: |
51+
cd XEngine_Source
52+
make PLATFORM=mac
53+
make PLATFORM=mac FLAGS=InstallAll
54+
make PLATFORM=mac FLAGS=CleanAll
55+
- name: make release
56+
run: |
57+
cd XEngine_Source
58+
make PLATFORM=mac RELEASE=1
59+
make PLATFORM=mac FLAGS=InstallAll
60+
make PLATFORM=mac FLAGS=CleanAll
61+
- name: test
62+
run: |
63+
cd XEngine_Release
64+
./XEngine_AuthorizeService -t

.github/workflows/msbuild.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: windows build workflows
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
strategy:
15+
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
16+
fail-fast: false
17+
matrix:
18+
configuration: [Debug ,Release]
19+
platform: [x86 ,x64]
20+
21+
runs-on: windows-latest # 最新的 Windows 环境
22+
23+
steps:
24+
# 检出您的主仓库代码
25+
- name: Checkout main repository code
26+
uses: actions/checkout@v4
27+
with:
28+
ref: 'develop'
29+
30+
# 检出依赖的xengine仓库到指定的xengine目录
31+
- name: Checkout dependency repository (xengine)
32+
uses: actions/checkout@v4
33+
with:
34+
repository: libxengine/libxengine
35+
path: xengine
36+
37+
- name: sub module checkout (opensource)
38+
run: |
39+
git submodule init
40+
git submodule update
41+
shell: pwsh
42+
43+
# 设置依赖库的环境变量
44+
- name: Set up Dependency Environment Variables
45+
run: |
46+
echo "XENGINE_INCLUDE=${{ github.workspace }}/xengine" | Out-File -FilePath $env:GITHUB_ENV -Append
47+
echo "XENGINE_LIB32=${{ github.workspace }}/xengine/XEngine_Windows/x86" | Out-File -FilePath $env:GITHUB_ENV -Append
48+
echo "XENGINE_LIB64=${{ github.workspace }}/xengine/XEngine_Windows/x64" | Out-File -FilePath $env:GITHUB_ENV -Append
49+
shell: pwsh
50+
51+
# 配置 MSBuild 的路径,准备构建 VC++ 项目
52+
- name: Setup MSBuild
53+
uses: microsoft/[email protected]
54+
#编译
55+
- name: Build Solution
56+
run: msbuild XEngine_Source/XEngine.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
57+
#测试
58+
- name: Conditional Step for x86 Release
59+
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
60+
run: |
61+
cp -r XEngine_Source/Release/*.dll XEngine_Release/
62+
cp -r XEngine_Source/Release/*.exe XEngine_Release/
63+
cp -r XEngine_Source/VSCopy_x86.bat XEngine_Release/
64+
cd XEngine_Release
65+
./VSCopy_x86.bat
66+
./XEngine_AuthorizeService.exe -t
67+
shell: pwsh
68+
- name: Conditional Step for x86 Debug
69+
if: matrix.configuration == 'Debug' && matrix.platform == 'x86'
70+
run: |
71+
cp -r XEngine_Source/Debug/*.dll XEngine_Release/
72+
cp -r XEngine_Source/Debug/*.exe XEngine_Release/
73+
cp -r XEngine_Source/VSCopy_x86.bat XEngine_Release/
74+
cd XEngine_Release
75+
./VSCopy_x86.bat
76+
./XEngine_AuthorizeService.exe -t
77+
shell: pwsh

CHANGELOG

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
XEngine_Authorize V3.14.0.1001
2+
3+
增加:支持无限制多端登录了
4+
增加:工作流CI支持
5+
增加:当tcp或者websocket登录的时候会返回token了
6+
增加:普通用户token开关支持
7+
修改:websocket支持解析token字段了
8+
修改:现在http post方法不在需要验证用户,使用token替代
9+
修改:可以通过token获取用户过期时间
10+
修改:公告和动态码合并到token任务中
11+
修改:注册管理界面默认设置5次次数验证了
12+
修改:多端登录序列类型进行了验证
13+
修正:删除用户需要验证用户了
14+
修正:某些时候崩溃
15+
修正:公告信息可以为NULL的情况
16+
修正:快速验证不允许硬件码为NULL了
17+
修正:子模块状态错误
18+
修正:在MACOS构建运行失败的问题
19+
删除:XEngine_AuthorizeHTTP_Announcement列举处理方法函数
20+
21+
added:unlimited login type with multi supported now
22+
added:workflow
23+
added:reply token handle when tcp and websocket login
24+
added:token auth for normal user of switch
25+
modify:web socket support parse token field
26+
modify:The post method processing flow now only requires token instead of verifying user and password
27+
modify:get user left time by token
28+
modify:merge notice and dynamic code and token task
29+
modify:set time 5 default value with cdkey init and choice time add serial for management app
30+
modify:multi login serial type is verification now
31+
fixed:verification user information for delete user
32+
fixed:some crashed
33+
fixed:the problem that notice can be set null
34+
fixed:does not allow code is null when fast verification
35+
fixed:sub module status is incorrect
36+
fixed:build error on mac
37+
delete:XEngine_AuthorizeHTTP_Announcement list process from get method
38+
================================================================
139
XEngine_Authorize V3.13.0.1001
240

341
增加:管理程序支持CDKEY创建,打开,授权,初始化

README.en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ feature list:
5151

5252
#### XEngine Evn
5353
you must install XEngine,need V8.15 or above,install XEngine can be refer to xengine Readme docment
54-
GITEE:https://gitee.com/xyry/libxengine
55-
GITHUB:https://github.com/libxengine/xengine
54+
GITEE:https://gitee.com/libxengine/libxengine
55+
GITHUB:https://github.com/libxengine/libxengine
5656

5757
##### fast to deployment
58-
git clone https://gitee.com/xyry/libxengine.git or git clone https://github.com/libxengine/xengine.git
58+
git clone https://gitee.com/libxengine/libxengine.git or git clone https://github.com/libxengine/libxengine.git
5959
window Exection XEngine_WINEnv.bat
6060
Linux Exection:sudo ./XEngine_LINEnv.sh -i 3
6161
Macos Exection:./XEngine_LINEnv.sh -i 3

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ XEngine_Authorize
5959

6060
#### XEngine环境
6161
必须安装XEngine,版本需要V8.15或者以上版本,安装XEngine可以参考其Readme文档
62-
GITEE:https://gitee.com/xyry/libxengine
63-
GITHUB:https://github.com/libxengine/xengine
62+
GITEE:https://gitee.com/libxengine/libxengine
63+
GITHUB:https://github.com/libxengine/libxengine
6464

6565
###### 快速部署
66-
git clone https://gitee.com/xyry/libxengine.git 或者 git clone https://github.com/libxengine/xengine.git
66+
git clone https://gitee.com/libxengine/libxengine.git 或者 git clone https://github.com/libxengine/libxengine.git
6767
window执行XEngine_WINEnv.bat 脚本.
6868
Linux执行:sudo ./XEngine_LINEnv.sh -i 3
6969
macos执行:./XEngine_LINEnv.sh -i 3
@@ -72,7 +72,7 @@ macos执行:./XEngine_LINEnv.sh -i 3
7272
由于依赖的子模块,在你checkout仓库后,在仓库目录下执行下面的命令拉取子模块
7373
git submodule init
7474
git submodule update
75-
如果github访问失败,也可以在XEngine_Source\XEngine_Depend 下直接clone项目:git clone https://gitee.com/xengine/XEngine_OPenSource.git
75+
如果github访问失败,你也可以clone该项目,在主目录下使用命令:git clone https://gitee.com/xengine/XEngine_OPenSource.git XEngine_Source/XEngine_Depend
7676

7777
#### Windows
7878
使用VS打开并且编译,支持WINDOWS 7SP1以上系统

XEngine_Apps/Authorize_APPClient/Authorize_APPClient.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ XHTHREAD AuthClient_Thread()
8080
if (0 == st_ProtocolHdr.wReserve)
8181
{
8282
printf(_X("登录成功\n"));
83+
xhToken = st_ProtocolHdr.xhToken;
8384
}
8485
else
8586
{
@@ -182,7 +183,7 @@ int AuthClient_Pay()
182183
}
183184
int AuthClient_DynamicCode()
184185
{
185-
LPCXSTR lpszUrl = _X("http://127.0.0.1:5302/api?function=dcode&user=get");
186+
LPCXSTR lpszUrl = _X("http://127.0.0.1:5302/api?function=dcode");
186187

187188
int nMsgLen = 0;
188189
XCHAR* ptszMsgBuffer = NULL;
@@ -284,7 +285,8 @@ int AuthClient_Login()
284285
}
285286
int AuthClient_Notice()
286287
{
287-
LPCXSTR lpszUrl = _X("http://127.0.0.1:5302/api?function=notice");
288+
XCHAR tszURLStr[MAX_PATH] = {};
289+
_xstprintf(tszURLStr, _T("http://127.0.0.1:5302/api?function=notice&token=%lld"), xhToken);
288290

289291
int nMsgLen = 0;
290292
XCHAR* ptszMsgBuffer = NULL;
@@ -294,7 +296,7 @@ int AuthClient_Notice()
294296
Json::CharReaderBuilder st_ReaderBuilder;
295297
std::unique_ptr<Json::CharReader> const pSt_JsonReader(st_ReaderBuilder.newCharReader());
296298

297-
APIClient_Http_Request(_X("GET"), lpszUrl, NULL, NULL, &ptszMsgBuffer, &nMsgLen);
299+
APIClient_Http_Request(_X("GET"), tszURLStr, NULL, NULL, &ptszMsgBuffer, &nMsgLen);
298300
if (bEncrypto)
299301
{
300302
XCHAR tszDEBuffer[2048] = {};
@@ -373,7 +375,8 @@ int AuthClient_GetTime()
373375
{
374376
Json::Value st_JsonRoot;
375377
Json::Value st_JsonObject;
376-
LPCXSTR lpszUrl = _X("http://127.0.0.1:5302/auth/user/time");
378+
XCHAR tszURLStr[MAX_PATH] = {};
379+
_xstprintf(tszURLStr, _T("http://127.0.0.1:5302/api?function=time&token=%lld"),xhToken);
377380

378381
st_JsonObject["tszUserName"] = lpszUser;
379382
st_JsonObject["tszUserPass"] = lpszPass;
@@ -389,15 +392,15 @@ int AuthClient_GetTime()
389392

390393
nMsgLen = st_JsonRoot.toStyledString().length();
391394
OPenSsl_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (XBYTE*)tszENBuffer, lpszPass);
392-
APIClient_Http_Request(_X("POST"), lpszUrl, tszENBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
395+
APIClient_Http_Request(_X("GET"), tszURLStr, tszENBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
393396

394397
OPenSsl_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszDEBuffer, lpszPass);
395398
printf("AuthClient_GetTime:\n%s\n", tszDEBuffer);
396399
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
397400
}
398401
else
399402
{
400-
APIClient_Http_Request(_X("POST"), lpszUrl, st_JsonRoot.toStyledString().c_str(), NULL, &ptszMsgBuffer, &nMsgLen);
403+
APIClient_Http_Request(_X("GET"), tszURLStr, st_JsonRoot.toStyledString().c_str(), NULL, &ptszMsgBuffer, &nMsgLen);
401404
printf("AuthClient_GetTime:\n%s\n", ptszMsgBuffer);
402405
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
403406
}
@@ -449,8 +452,8 @@ int AuthClient_Try()
449452
LPCXSTR lpszSerialNet = _X("cpuid:112233"); //通过此可以做临时网络验证,安全性比本地临时验证高
450453
LPCXSTR lpszUrl = _X("http://127.0.0.1:5302/auth/user/try");
451454

452-
st_JsonObject["tszSerial"] = lpszSerialNet;
453-
st_JsonRoot["st_UserTry"] = st_JsonObject;
455+
st_JsonObject["tszVSerial"] = lpszSerialNet;
456+
st_JsonRoot["st_VERTemp"] = st_JsonObject;
454457

455458
int nMsgLen = 0;
456459
XCHAR* ptszMsgBuffer = NULL;
@@ -502,7 +505,7 @@ int main()
502505
AuthClient_GetPass();
503506
AuthClient_GetTime();
504507

505-
std::this_thread::sleep_for(std::chrono::seconds(600));
508+
std::this_thread::sleep_for(std::chrono::seconds(10));
506509
AuthClient_Delete();
507510
AuthClient_Try();
508511

XEngine_Docment/Docment_en.docx

1.36 KB
Binary file not shown.

XEngine_Docment/Docment_zh.docx

1.72 KB
Binary file not shown.

XEngine_Release/XEngine_Config/XEngine_SwitchConfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
"bSwitchDCode":false,
1111
"bSwitchMulti":true,
1212
"bSwitchTry":true,
13-
"bSwitchBanned":true
13+
"bSwitchBanned":true,
14+
"bSwitchTokenLogin":true
1415
}

0 commit comments

Comments
 (0)