diff --git a/.github/workflows/Alma_build.yml b/.github/workflows/Alma_build.yml
new file mode 100644
index 0000000..9f5458f
--- /dev/null
+++ b/.github/workflows/Alma_build.yml
@@ -0,0 +1,95 @@
+name: alma build workflows
+
+on:
+ push:
+ branches:
+ - 'develop'
+ paths:
+ - 'XEngine_Source/**'
+ - 'XEngine_Release/**'
+ - '.github/**'
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ runs-on: ${{ matrix.runner }}
+ container:
+ image: almalinux:${{ matrix.version }}
+ options: --platform ${{ matrix.platform }}
+ strategy:
+ matrix:
+ include:
+ - arch: amd64
+ runner: ubuntu-24.04
+ platform: linux/amd64
+ artifact: x86-64
+ version: 9
+ - arch: amd64
+ runner: ubuntu-24.04
+ platform: linux/amd64
+ artifact: x86-64
+ version: 10
+ - arch: arm64
+ runner: ubuntu-24.04-arm
+ platform: linux/arm64
+ artifact: Arm64
+ version: 9
+ - arch: arm64
+ runner: ubuntu-24.04-arm
+ platform: linux/arm64
+ artifact: Arm64
+ version: 10
+
+ steps:
+ - name: Checkout main repository code
+ uses: actions/checkout@v4
+
+ - name: Checkout dependency repository (xengine)
+ uses: actions/checkout@v4
+ with:
+ repository: libxengine/libxengine
+ path: libxengine
+
+ - name: sub module checkout (opensource)
+ uses: actions/checkout@v4
+ with:
+ repository: libxengine/XEngine_OPenSource
+ path: XEngine_Source/XEngine_DependLibrary
+
+ - name: Set TERM variable
+ run: echo "TERM=xterm" >> $GITHUB_ENV
+
+ - name: install system package
+ run: |
+ dnf update -y
+ dnf install gcc g++ make git jq unzip wget -y
+
+ - name: install xengine library
+ run: |
+ latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
+ wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}.zip
+ unzip ./XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}.zip -d ./XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
+ cd XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
+
+ chmod 777 *
+ ./XEngine_LINEnv.sh -i 3
+
+ - name: make
+ run: |
+ cd XEngine_Source
+ make RELEASE=1
+ make FLAGS=InstallAll
+ make FLAGS=CleanAll
+ cd ..
+ - name: test
+ run: |
+ cd XEngine_Release
+ ./XEngine_ProxyServiceApp -t
+
+ - name: Upload folder as artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: XEngine_ProxyServiceApp-AlmaLinux_${{ matrix.version }}_${{ matrix.artifact }}
+ path: XEngine_Release/
\ No newline at end of file
diff --git a/.github/workflows/Centos_build.yml b/.github/workflows/Centos_build.yml
new file mode 100644
index 0000000..5465efa
--- /dev/null
+++ b/.github/workflows/Centos_build.yml
@@ -0,0 +1,102 @@
+name: centos build workflows
+
+on:
+ push:
+ branches:
+ - 'develop'
+ paths:
+ - 'XEngine_Source/**'
+ - 'XEngine_Release/**'
+ - '.github/**'
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ runs-on: ${{ matrix.runner }}
+ container:
+ image: quay.io/centos/centos:${{ matrix.stream }}
+ options: --platform ${{ matrix.platform }}
+ strategy:
+ matrix:
+ include:
+ - arch: amd64
+ runner: ubuntu-24.04
+ platform: linux/amd64
+ artifact: x86-64
+ version: 9
+ stream: stream9
+ - arch: amd64
+ runner: ubuntu-24.04
+ platform: linux/amd64
+ artifact: x86-64
+ version: 10
+ stream: stream10
+ - arch: arm64
+ runner: ubuntu-24.04-arm
+ platform: linux/arm64
+ artifact: Arm64
+ version: 9
+ stream: stream9
+ - arch: arm64
+ runner: ubuntu-24.04-arm
+ platform: linux/arm64
+ artifact: Arm64
+ version: 10
+ stream: stream10
+
+ steps:
+ - name: Checkout main repository code
+ uses: actions/checkout@v4
+
+ - name: Checkout dependency repository (xengine)
+ uses: actions/checkout@v4
+ with:
+ repository: libxengine/libxengine
+ path: libxengine
+
+ - name: sub module checkout (opensource)
+ uses: actions/checkout@v4
+ with:
+ repository: libxengine/XEngine_OPenSource
+ path: XEngine_Source/XEngine_DependLibrary
+
+ - name: install system package
+ run: |
+ dnf update -y
+ dnf install gcc g++ make git jq unzip wget -y
+
+ - name: Set TERM variable
+ run: echo "TERM=xterm" >> $GITHUB_ENV
+
+ - name: install xengine library
+ run: |
+ latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
+ wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}.zip
+ unzip ./XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}.zip -d ./XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
+ cd XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
+
+ chmod 777 *
+ ./XEngine_LINEnv.sh -i 3
+ - name: make
+ run: |
+ cd XEngine_Source
+ make
+ make FLAGS=InstallAll
+ make FLAGS=CleanAll
+
+ make RELEASE=1
+ make FLAGS=InstallAll
+ make FLAGS=CleanAll
+ - name: test
+ run: |
+ cd XEngine_Release
+ ./XEngine_ProxyServiceApp -t
+
+ - name: Upload folder as artifact with CentOS
+ uses: actions/upload-artifact@v4
+ with:
+ name: XEngine_ProxyServiceApp-CentOS_${{ matrix.version }}_${{ matrix.artifact }}
+ path: XEngine_Release/
+ retention-days: 1
\ No newline at end of file
diff --git a/.github/workflows/debian_build.yml b/.github/workflows/debian_build.yml
index c9c4073..2e8d342 100644
--- a/.github/workflows/debian_build.yml
+++ b/.github/workflows/debian_build.yml
@@ -16,7 +16,7 @@ jobs:
build:
runs-on: ${{ matrix.runner }}
container:
- image: debian:bookworm
+ image: debian:${{ matrix.name }}
options: --platform ${{ matrix.platform }}
strategy:
matrix:
@@ -25,6 +25,14 @@ jobs:
runner: ubuntu-24.04
platform: linux/amd64
artifact: x86-64
+ name: bookworm
+ version: 12
+ - arch: amd64
+ runner: ubuntu-24.04
+ platform: linux/amd64
+ artifact: x86-64
+ name: trixie
+ version: 13
steps:
- name: Checkout main repository code
@@ -55,9 +63,9 @@ jobs:
- name: install xengine library
run: |
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
- wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Debian_12_${{ matrix.artifact }}.zip
- unzip ./XEngine_Debian_12_${{ matrix.artifact }}.zip -d ./XEngine_Debian_12_${{ matrix.artifact }}
- cd XEngine_Debian_12_${{ matrix.artifact }}
+ wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Debian_${{ matrix.version }}_${{ matrix.artifact }}.zip
+ unzip ./XEngine_Debian_${{ matrix.version }}_${{ matrix.artifact }}.zip -d ./XEngine_Debian_${{ matrix.version }}_${{ matrix.artifact }}
+ cd XEngine_Debian_${{ matrix.version }}_${{ matrix.artifact }}
chmod 777 *
./XEngine_LINEnv.sh -i 3
@@ -80,6 +88,6 @@ jobs:
- name: Upload folder as artifact
uses: actions/upload-artifact@v4
with:
- name: XEngine_ProxyServiceApp-Debian_12_x86-64
+ name: XEngine_ProxyServiceApp-Debian_${{ matrix.version }}_x86-64
path: XEngine_Release/
retention-days: 1
\ No newline at end of file
diff --git a/.github/workflows/macbuild.yml b/.github/workflows/macbuild.yml
index e07fc55..c6041dd 100644
--- a/.github/workflows/macbuild.yml
+++ b/.github/workflows/macbuild.yml
@@ -14,8 +14,8 @@ jobs:
strategy:
matrix:
include:
- - os: macos-13
- - os: macos-14
+ - os: macos-15-intel
+ - os: macos-15
runs-on: ${{ matrix.os }}
steps:
@@ -43,13 +43,13 @@ jobs:
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- name: Set up Dependency x86_64 Environment
- if: matrix.os == 'macos-13'
+ if: matrix.os == 'macos-15-intel'
run: |
cd libxengine
chmod 777 *
./XEngine_LINEnv.sh -i 3
- name: Set up Dependency Arm64 Environment
- if: matrix.os == 'macos-14'
+ if: matrix.os == 'macos-15'
run: |
latest_tag=$(git ls-remote --tags --sort="v:refname" https://github.com/libxengine/libxengine.git | awk '{print $2}' | sed 's/refs\/tags\///' | tail -n 1)
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Mac_Arm64.zip
@@ -76,14 +76,14 @@ jobs:
./XEngine_ProxyServiceApp -t
- name: Upload folder as artifact with mac x64
- if: matrix.os == 'macos-13'
+ if: matrix.os == 'macos-15-intel'
uses: actions/upload-artifact@v4
with:
name: XEngine_ProxyServiceApp-Mac_x86_64
path: XEngine_Release/
retention-days: 1
- name: Upload folder as artifact with mac arm
- if: matrix.os == 'macos-14'
+ if: matrix.os == 'macos-15'
uses: actions/upload-artifact@v4
with:
name: XEngine_ProxyServiceApp-Mac_Arm64
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 607a17e..9bf137f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -43,6 +43,24 @@ jobs:
skip_unpack: true
if_no_artifact_found: fail
path: ./XRelease/
+ - name: Download Alma
+ uses: dawidd6/action-download-artifact@v6
+ with:
+ workflow: Alma_build.yml
+ workflow_conclusion: success
+ check_artifacts: false
+ skip_unpack: true
+ if_no_artifact_found: fail
+ path: ./XRelease/
+ - name: Download Centos
+ uses: dawidd6/action-download-artifact@v6
+ with:
+ workflow: Centos_build.yml
+ workflow_conclusion: success
+ check_artifacts: false
+ skip_unpack: true
+ if_no_artifact_found: fail
+ path: ./XRelease/
- name: Download Rockylinux
uses: dawidd6/action-download-artifact@v6
with:
diff --git a/CHANGELOG b/CHANGELOG
index 16f2dd2..2578762 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,19 @@
+XEngine_ProxyServer V1.15.0.1001
+
+ci:增加了centos和almalinux和debian 13 系统支持
+ci:更新了macos 系统版本
+更新:第三方库
+修改:使用了公用头替换登录协议
+修改:启动参数不区分大小写
+修复:某些时候读取配置内存溢出问题
+
+ci:add centos and almalinux and debian 13 system support
+ci:update macos system
+update:depend library
+modify:login protocol use protocol header instead
+modify:does not case sensitive for start parameter
+fixed:sometime memory leak when read configure file
+======================================================================================
XEngine_ProxyServer V1.14.0.1001
增加:rocky linux 10 支持
diff --git a/XEngine_APPClient/APPClient_ForwardExample/APPClient_ForwardExample.cpp b/XEngine_APPClient/APPClient_ForwardExample/APPClient_ForwardExample.cpp
index c9383d8..29c423d 100644
--- a/XEngine_APPClient/APPClient_ForwardExample/APPClient_ForwardExample.cpp
+++ b/XEngine_APPClient/APPClient_ForwardExample/APPClient_ForwardExample.cpp
@@ -56,7 +56,7 @@ int Proxy_NamedTest()
st_ProtocolHdr.byVersion = 0;
st_ProtocolHdr.unPacketSize = sizeof(XENGINE_PROTOCOL_USERAUTH);
st_ProtocolHdr.unOperatorType = ENUM_XENGINE_COMMUNICATION_PROTOCOL_TYPE_AUTH;
- st_ProtocolHdr.unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_LOGREQ;
+ st_ProtocolHdr.unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_AUTH_REQLOGIN;
_tcsxcpy(st_UserAuth.tszUserName, "test");
@@ -210,7 +210,7 @@ int Proxy_AnonyTest()
st_ProtocolHdr.byVersion = 0;
st_ProtocolHdr.unPacketSize = sizeof(XENGINE_PROTOCOL_USERAUTH);
st_ProtocolHdr.unOperatorType = ENUM_XENGINE_COMMUNICATION_PROTOCOL_TYPE_AUTH;
- st_ProtocolHdr.unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_LOGREQ;
+ st_ProtocolHdr.unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_AUTH_REQLOGIN;
_tcsxcpy(st_UserAuth.tszUserName, "test");
diff --git a/XEngine_APPClient/APPClient_ForwardExample/APPClient_ForwardExample.vcxproj b/XEngine_APPClient/APPClient_ForwardExample/APPClient_ForwardExample.vcxproj
index 26cfb62..ebcb4b9 100644
--- a/XEngine_APPClient/APPClient_ForwardExample/APPClient_ForwardExample.vcxproj
+++ b/XEngine_APPClient/APPClient_ForwardExample/APPClient_ForwardExample.vcxproj
@@ -71,11 +71,11 @@
- $(XEngine_Include);../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)
+ $(XEngine_Include);../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)
$(XEngine_Lib32);$(LibraryPath)
- $(XEngine_Include);../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)
+ $(XEngine_Include);../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)
$(XEngine_Lib64);$(LibraryPath)
diff --git a/XEngine_Release/XEngine_Config/XEngine_Version.json b/XEngine_Release/XEngine_Config/XEngine_Version.json
index f87e046..e6bf3e6 100644
--- a/XEngine_Release/XEngine_Config/XEngine_Version.json
+++ b/XEngine_Release/XEngine_Config/XEngine_Version.json
@@ -1,5 +1,6 @@
{
"XVer": [
+ "1.14.0.1001 Build20251020",
"1.13.0.1001 Build20250519",
"1.12.0.1001 Build20250325",
"1.11.0.1001 Build20250121",
diff --git a/XEngine_Source/XEngine_DependLibrary b/XEngine_Source/XEngine_DependLibrary
index 6a2fd03..24bde9d 160000
--- a/XEngine_Source/XEngine_DependLibrary
+++ b/XEngine_Source/XEngine_DependLibrary
@@ -1 +1 @@
-Subproject commit 6a2fd030257062f98b2a2751e9d5b6559901a53e
+Subproject commit 24bde9d212cd48b822ad8aab90956033972ee46b
diff --git a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp
index 02b3cc1..c820d5a 100644
--- a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp
+++ b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp
@@ -61,21 +61,12 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE
Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_OPENFILE;
return false;
}
- int nCount = 0;
- XCHAR tszMsgBuffer[4096];
- while (1)
- {
- int nRet = fread(tszMsgBuffer + nCount, 1, 2048, pSt_File);
- if (nRet <= 0)
- {
- break;
- }
- nCount += nRet;
- }
+ XCHAR tszMsgBuffer[8192];
+ int nRet = fread(tszMsgBuffer, 1, sizeof(tszMsgBuffer), pSt_File);
fclose(pSt_File);
//开始解析配置文件
std::unique_ptr const pSt_JsonReader(st_JsonBuilder.newCharReader());
- if (!pSt_JsonReader->parse(tszMsgBuffer, tszMsgBuffer + nCount, &st_JsonRoot, &st_JsonError))
+ if (!pSt_JsonReader->parse(tszMsgBuffer, tszMsgBuffer + nRet, &st_JsonRoot, &st_JsonError))
{
Config_IsErrorOccur = true;
Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_PARSE;
@@ -204,21 +195,12 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_Version(LPCXSTR lpszConfigFile,
Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_OPENFILE;
return false;
}
- int nCount = 0;
- XCHAR tszMsgBuffer[4096];
- while (1)
- {
- int nRet = fread(tszMsgBuffer + nCount, 1, 2048, pSt_File);
- if (nRet <= 0)
- {
- break;
- }
- nCount += nRet;
- }
+ XCHAR tszMsgBuffer[8192];
+ int nRet = fread(tszMsgBuffer, 1, sizeof(tszMsgBuffer), pSt_File);
fclose(pSt_File);
//开始解析配置文件
std::unique_ptr const pSt_JsonReader(st_JsonBuilder.newCharReader());
- if (!pSt_JsonReader->parse(tszMsgBuffer, tszMsgBuffer + nCount, &st_JsonRoot, &st_JsonError))
+ if (!pSt_JsonReader->parse(tszMsgBuffer, tszMsgBuffer + nRet, &st_JsonRoot, &st_JsonError))
{
Config_IsErrorOccur = true;
Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_PARSE;
diff --git a/XEngine_Source/XEngine_ModuleSession/ModuleSession_Define.h b/XEngine_Source/XEngine_ModuleSession/ModuleSession_Define.h
index f11be1f..9d64c2e 100644
--- a/XEngine_Source/XEngine_ModuleSession/ModuleSession_Define.h
+++ b/XEngine_Source/XEngine_ModuleSession/ModuleSession_Define.h
@@ -20,7 +20,7 @@ typedef enum
}ENUM_PROXY_SESSION_CLIENT_STATUS;
typedef struct
{
- XENGINE_PROTOCOL_USERAUTH st_UserAuth;
+ XENGINE_PROTOCOL_USERAUTHEX st_UserAuth;
XCHAR tszSrcAddr[128];
XCHAR tszDstAddr[128];
XNETHANDLE xhClient;
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_Configure.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_Configure.cpp
index 1dcc115..b537342 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_Configure.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_Configure.cpp
@@ -28,57 +28,56 @@ bool XEngine_Configure_Parament(int argc, char** argv, XENGINE_SERVICECONFIG* pS
for (int i = 0; i < argc; i++)
{
- if (0 == _tcsxicmp("-h", argv[i]))
+ if (0 == _tcsxcmp("-h", argv[i]))
{
XEngine_Configure_Help();
return false;
}
- else if (0 == _tcsxicmp("-d", argv[i]))
+ else if (0 == _tcsxcmp("-d", argv[i]))
{
pSt_Configure->bDeamon = _ttxoi(argv[++i]);
}
- else if (0 == _tcsxicmp("-ps", argv[i]))
+ else if (0 == _tcsxcmp("-ps", argv[i]))
{
st_ServiceConfig.nSocksPort = _ttxoi(argv[++i]);
}
- else if (0 == _tcsxicmp("-pt", argv[i]))
+ else if (0 == _tcsxcmp("-pt", argv[i]))
{
st_ServiceConfig.nTunnelPort = _ttxoi(argv[++i]);
}
- else if (0 == _tcsxicmp("-pf", argv[i]))
+ else if (0 == _tcsxcmp("-pf", argv[i]))
{
st_ServiceConfig.nForwardPort = _ttxoi(argv[++i]);
}
- else if (0 == _tcsxicmp("-pp", argv[i]))
+ else if (0 == _tcsxcmp("-pp", argv[i]))
{
st_ServiceConfig.nProxyPort = _ttxoi(argv[++i]);
}
- else if (0 == _tcsxicmp("-v", argv[i]))
+ else if (0 == _tcsxcmp("-v", argv[i]))
{
- string m_StrVersion = st_ServiceConfig.st_XVer.pStl_ListVer->front();
- printf("Version:%s\n", m_StrVersion.c_str());
+ printf("Version:%s\n", st_ServiceConfig.st_XVer.pStl_ListVer->front().c_str());
return false;
}
- else if (0 == _tcsxicmp("-t", argv[i]))
+ else if (0 == _tcsxcmp("-t", argv[i]))
{
bIsTest = true;
}
- else if (0 == _tcsxicmp("-lt", argv[i]))
+ else if (0 == _tcsxcmp("-lt", argv[i]))
{
pSt_Configure->st_XLog.nLogType = _ttxoi(argv[++i]);
}
- else if (0 == _tcsxicmp("-l", argv[i]))
+ else if (0 == _tcsxcmp("-l", argv[i]))
{
LPCXSTR lpszLogLevel = argv[++i];
- if (0 == _tcsxicmp("debug", lpszLogLevel))
+ if (0 == _tcsxcmp("debug", lpszLogLevel))
{
pSt_Configure->st_XLog.nLogLeave = XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_DEBUG;
}
- else if (0 == _tcsxicmp("detail", lpszLogLevel))
+ else if (0 == _tcsxcmp("detail", lpszLogLevel))
{
pSt_Configure->st_XLog.nLogLeave = XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_DETAIL;
}
- else if (0 == _tcsxicmp("info", lpszLogLevel))
+ else if (0 == _tcsxcmp("info", lpszLogLevel))
{
pSt_Configure->st_XLog.nLogLeave = XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO;
}
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_ForwardTask.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_ForwardTask.cpp
index 1b508d2..84296c6 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_ForwardTask.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_ForwardTask.cpp
@@ -50,7 +50,7 @@ bool XEngine_Forward_Handle(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int n
//处理验证协议
if (ENUM_XENGINE_COMMUNICATION_PROTOCOL_TYPE_AUTH == pSt_ProtocolHdr->unOperatorType)
{
- if (XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_LOGREQ == pSt_ProtocolHdr->unOperatorCode)
+ if (XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_AUTH_REQLOGIN == pSt_ProtocolHdr->unOperatorCode)
{
XENGINE_PROTOCOL_USERAUTH st_UserAuth;
memset(&st_UserAuth, '\0', sizeof(XENGINE_PROTOCOL_USERAUTH));
@@ -58,7 +58,7 @@ bool XEngine_Forward_Handle(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int n
memcpy(&st_UserAuth, lpszMsgBuffer, sizeof(XENGINE_PROTOCOL_USERAUTH));
pSt_ProtocolHdr->wReserve = 0;
pSt_ProtocolHdr->unPacketSize = 0;
- pSt_ProtocolHdr->unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_LOGREP;
+ pSt_ProtocolHdr->unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_AUTH_REPLOGIN;
ModuleSession_Forward_Insert(lpszClientAddr, &st_UserAuth);
XEngine_Network_Send(lpszClientAddr, (LPCXSTR)pSt_ProtocolHdr, sizeof(XENGINE_PROTOCOLHDR), XENGINE_CLIENT_NETTYPE_FORWARD);
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("Forward客户端:%s,设置的用户:%s,登录到服务器"), lpszClientAddr, st_UserAuth.tszUserName);
diff --git a/XEngine_Source/XEngine_UserProtocol.h b/XEngine_Source/XEngine_UserProtocol.h
index cbd4187..81eb1a5 100644
--- a/XEngine_Source/XEngine_UserProtocol.h
+++ b/XEngine_Source/XEngine_UserProtocol.h
@@ -17,9 +17,7 @@ typedef enum en_XEngine_XUser_Protocol
{
ENUM_XENGINE_COMMUNICATION_PROTOCOL_TYPE_USER_FORWARD = ENUM_XENGINE_COMMUNICATION_PROTOCOL_TYPE_USER + 1
}ENUM_XNETENGINE_XUSER_PROTOCOL;
-//转发协议
-#define XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_LOGREQ 0xE1000 //登录请求
-#define XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_LOGREP 0xE1001
+//转发协议
#define XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_LISTREQ 0xE1002 //列表请求
#define XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_LISTREP 0xE1003
#define XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_NAMEDREQ 0xE1004 //命名请求