Skip to content

Commit 7ae3119

Browse files
authored
Merge pull request #80 from libxengine/develop
Merge V3.15
2 parents a4a4a17 + 0f0ee10 commit 7ae3119

File tree

42 files changed

+619
-119
lines changed

Some content is hidden

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

42 files changed

+619
-119
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Issue Translator
2+
on:
3+
issue_comment:
4+
types: [created]
5+
issues:
6+
types: [opened]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: usthe/[email protected]
13+
with:
14+
IS_MODIFY_TITLE: false
15+
CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically.

.github/workflows/linuxbuild.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: ubuntu build workflows
33
on:
44
push:
55
branches: [ "develop" ]
6-
pull_request:
7-
branches: [ "develop" ]
8-
6+
paths:
7+
- 'XEngine_Source/**'
8+
- 'XEngine_Release/**'
99
permissions:
1010
contents: read
1111

@@ -61,4 +61,10 @@ jobs:
6161
- name: test
6262
run: |
6363
cd XEngine_Release
64-
./XEngine_AuthorizeService -t
64+
./XEngine_AuthorizeService -t
65+
66+
- name: Upload folder as artifact with ubuntu
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: XEngine_AuthorizeService-x86_64-Ubuntu
70+
path: XEngine_Release/

.github/workflows/macbuild.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ name: macos build workflows
33
on:
44
push:
55
branches: [ "develop" ]
6-
pull_request:
7-
branches: [ "develop" ]
6+
paths:
7+
- 'XEngine_Source/**'
8+
- 'XEngine_Release/**'
89

910
permissions:
1011
contents: read
@@ -29,6 +30,7 @@ jobs:
2930
with:
3031
repository: libxengine/libxengine
3132
path: libxengine
33+
ref: 'master'
3234

3335
- name: sub module checkout (opensource)
3436
run: |
@@ -62,3 +64,9 @@ jobs:
6264
run: |
6365
cd XEngine_Release
6466
./XEngine_AuthorizeService -t
67+
68+
- name: Upload folder as artifact with mac
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: XEngine_AuthorizeService-x86_64-Mac
72+
path: XEngine_Release/

.github/workflows/msbuild.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ name: windows build workflows
22

33
on:
44
push:
5-
branches: [ "develop" ]
6-
pull_request:
7-
branches: [ "develop" ]
8-
9-
permissions:
10-
contents: read
11-
5+
branches:
6+
- develop
7+
paths:
8+
- 'XEngine_Source/**'
9+
- 'XEngine_Release/**'
10+
1211
jobs:
1312
build:
1413
strategy:
@@ -50,7 +49,7 @@ jobs:
5049

5150
# 配置 MSBuild 的路径,准备构建 VC++ 项目
5251
- name: Setup MSBuild
53-
uses: microsoft/setup-msbuild@v1.0.2
52+
uses: microsoft/setup-msbuild@v2
5453
#编译
5554
- name: Build Solution
5655
run: msbuild XEngine_Source/XEngine.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
@@ -65,13 +64,27 @@ jobs:
6564
./VSCopy_x86.bat
6665
./XEngine_AuthorizeService.exe -t
6766
shell: pwsh
68-
- name: Conditional Step for x86 Debug
69-
if: matrix.configuration == 'Debug' && matrix.platform == 'x86'
67+
- name: Conditional Step for x64 Release
68+
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
7069
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/
70+
cp -r XEngine_Source/x64/Release/*.dll XEngine_Release/
71+
cp -r XEngine_Source/x64/Release/*.exe XEngine_Release/
72+
cp -r XEngine_Source/VSCopy_x64.bat XEngine_Release/
7473
cd XEngine_Release
75-
./VSCopy_x86.bat
76-
./XEngine_AuthorizeService.exe -t
74+
./VSCopy_x64.bat
7775
shell: pwsh
76+
77+
#将文件夹打包为 artifact
78+
- name: Upload folder as artifact with x86
79+
if: matrix.configuration == 'Release' && matrix.platform == 'x86'
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: XEngine_AuthorizeService-x86_32-Windows
83+
path: XEngine_Release/
84+
85+
- name: Upload folder as artifact with x64
86+
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: XEngine_AuthorizeService-x86_64-Windows
90+
path: XEngine_Release/

.github/workflows/release.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: release packet
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# 检出代码并包含标签
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Download linuxbuild
20+
uses: dawidd6/action-download-artifact@v6
21+
with:
22+
workflow: linuxbuild.yml
23+
workflow_conclusion: success
24+
check_artifacts: false
25+
skip_unpack: true
26+
if_no_artifact_found: fail
27+
path: ./XRelease/
28+
- name: Download macbuild
29+
uses: dawidd6/action-download-artifact@v6
30+
with:
31+
workflow: macbuild.yml
32+
workflow_conclusion: success
33+
check_artifacts: false
34+
skip_unpack: true
35+
if_no_artifact_found: fail
36+
path: ./XRelease/
37+
- name: Download msbuild
38+
uses: dawidd6/action-download-artifact@v6
39+
with:
40+
workflow: msbuild.yml
41+
workflow_conclusion: success
42+
check_artifacts: false
43+
skip_unpack: true
44+
if_no_artifact_found: fail
45+
path: ./XRelease/
46+
47+
- name: Display structure of downloaded files
48+
run: ls -al ./XRelease/
49+
50+
- name: Get current version and increment X
51+
id: versioning
52+
run: |
53+
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
54+
echo "Latest tag: $latest_tag"
55+
# 提取 X 的值并递增
56+
major=$(echo $latest_tag | cut -d '.' -f 1)
57+
minor=$(echo $latest_tag | cut -d '.' -f 2)
58+
patch=$(echo $latest_tag | cut -d '.' -f 3)
59+
build=$(echo $latest_tag | cut -d '.' -f 4)
60+
61+
new_minor=$((minor + 1))
62+
new_version="$major.$new_minor.$patch.$build"
63+
echo "New version: $new_version"
64+
echo "new_tag=$new_version" >> $GITHUB_OUTPUT
65+
echo "prev_tag=$latest_tag" >> $GITHUB_OUTPUT
66+
67+
- name: Create and push new tag
68+
run: |
69+
git tag ${{ steps.versioning.outputs.new_tag }}
70+
git push origin ${{ steps.versioning.outputs.new_tag }}
71+
72+
- name: Generate release notes
73+
run: |
74+
logs=$(git log ${{ steps.versioning.outputs.prev_tag }}..${{ steps.versioning.outputs.new_tag }} --pretty=format:"* %h - %s - %an - %cd" --no-merges)
75+
release_notes=$(echo "$logs" | sed 's/ qyt$/ @xengine-qyt/')
76+
echo "$release_notes"
77+
echo "$release_notes" > release_notes.txt
78+
79+
- name: Release
80+
uses: softprops/action-gh-release@v2
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
with:
84+
draft: false
85+
prerelease: false
86+
tag_name: ${{ steps.versioning.outputs.new_tag }}
87+
name: XEngine_AuthorizeService ${{ steps.versioning.outputs.new_tag }}
88+
body_path: release_notes.txt
89+
files: ./XRelease/*.zip

CHANGELOG

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
XEngine_Authorize V3.15.0.1001
2+
3+
增加:密码加密
4+
增加:TOKEN自动续期
5+
增加:服务和管理程序coredump支持
6+
增加:client 删除用户协议支持
7+
更新:工作流CI添加了发布CI
8+
更新:依赖库
9+
优化:启动参数解析
10+
优化:不支持的协议提示
11+
优化:管理端用户插入修改初始化值
12+
修改:用户删除方法
13+
修改:密码协议现在支持找回和设置功能了
14+
修正:某些时候退出崩溃
15+
修正:管理端添加用户失败的问题
16+
修正:多端登录处理不正确的问题
17+
18+
added:pass encrypt supported
19+
added:auto renewal token
20+
added:service app and management app core-dump supported
21+
added:delete client for management app with token
22+
update:workflow and add release ci
23+
update:depend library
24+
improved:start parameter parse
25+
improved:tips when request not support protocol
26+
improved:user insert and modify init value for management app
27+
modify:user delete away
28+
modify:user pass now support get and set
29+
fixed:crashed when exist
30+
fixed:add user incorrect for management app
31+
fixed:multi login handle is incorrect and tips logged in
32+
================================================================
133
XEngine_Authorize V3.14.0.1001
234

335
增加:支持无限制多端登录了

README.en.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ network verification support tcp and websocket and http protocol verification.it
1111
first open source C/C++ network authentication server, supporting various languages ​​and platforms for network authentication and authorization
1212
This is a cross-platform simple high-performance network authorization server that provides a complete demo code
1313

14+
## Notice
15+
the compiled release version will only be released on github.
16+
1417
#### why choose us
1518
Fast iteration: feature updates are timely
1619
Technical support: complete technical documentation and technical support, quick response to your questions
@@ -119,6 +122,7 @@ port :tcp port 5300,websocket port 5301,http management port 5302,Transmission v
119122
2. Create new Feat_xxx branch
120123
3. Submit the code
121124
4. New Pull Request
125+
5. merge to develop branch
122126

123127
## development path
124128
The V1 version is an XEngine component. Most of the code is concentrated in XEngine

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ c c++network Authorize service
1111
全国首款开源C/C++ 网络验证服务器,支持各种语言各种平台进行网络验证和授时服务
1212
这是一个跨平台简单高性能网络授权服务器,提供了完整的演示代码
1313

14+
## 注意
15+
编译发布版本将只在github上面发布.
16+
1417
#### 为什么选择我们
1518
快速迭代:功能更新及时
1619
技术支持:完善的技术文档和技术支持,快速响应你的问题
@@ -130,6 +133,7 @@ Linux or macos:直接运行即可
130133
2. 新建 Feat_xxx 分支
131134
3. 提交代码
132135
4. 新建 Pull Request
136+
5. 提交到develop分支
133137

134138
## 发展历程
135139
V1版本为XEngine组件.大部分代码集中在XEngine中

XEngine_Apps/Authorize_APPClient/Authorize_APPClient.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ using namespace std;
3535
//Linux::g++ -std=c++17 -Wall -g Authorize_APPClient.cpp -o Authorize_APPClient.exe -I ../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp -L ../../XEngine_Release -lXEngine_OPenSsl -lXClient_Socket -lXEngine_BaseLib -lXClient_APIHelp -lpthread -ljsoncpp -Wl,-rpath=../../XEngine_Release
3636

3737
//#define _DYNAMIC_CODE
38+
//#define _PASS_ENCRYPT
3839
bool bRun = true;
3940
bool bLogin = true;
4041
bool bTimeOut = true;
@@ -244,6 +245,14 @@ int AuthClient_Login()
244245
strcpy(st_AuthUser.tszUserName, lpszUser);
245246
strcpy(st_AuthUser.tszUserPass, lpszPass);
246247

248+
#ifdef _PASS_ENCRYPT
249+
int nPLen = _tcsxlen(st_AuthUser.tszUserPass);
250+
XBYTE byMD5Buffer[MAX_PATH] = {};
251+
OPenSsl_Api_Digest(st_AuthUser.tszUserPass, byMD5Buffer, &nPLen, false, XENGINE_OPENSSL_API_DIGEST_MD5);
252+
memset(st_AuthUser.tszUserPass, '\0', sizeof(st_AuthUser.tszUserPass));
253+
BaseLib_OperatorString_StrToHex((LPCXSTR)byMD5Buffer, nPLen, st_AuthUser.tszUserPass);
254+
#endif
255+
247256
if (nDYCode > 0)
248257
{
249258
st_ProtocolHdr.xhToken = xhToken;

XEngine_Docment/Docment_en.docx

892 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)