diff --git a/.github/workflows/RockyArm64_build.yml b/.github/workflows/RockyArm64_build.yml new file mode 100644 index 0000000000000000000000000000000000000000..5b339785cf56a9b363a36182ffb8fd5f402f9372 --- /dev/null +++ b/.github/workflows/RockyArm64_build.yml @@ -0,0 +1,78 @@ +name: rocky Arm64 build workflows + +on: + push: + branches: + - 'develop' + paths: + - 'XEngine_Source/**' + - 'XEngine_Release/**' + - '.github/**' + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-24.04 + env: + IMAGE_NAME: rockylinux/rockylinux:9.5 + + strategy: + fail-fast: false + matrix: + arch: [linux/arm64] + + steps: + # 检出您的主仓库代码 + - name: Checkout main repository code + uses: actions/checkout@v4 + with: + ref: 'develop' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Build ${{ matrix.arch }} + run: | + docker run --platform ${{ matrix.arch }} --rm \ + -v ${{ github.workspace }}:/workspace \ + -w /workspace ${{ env.IMAGE_NAME }} /bin/sh -c ' + set -e + dnf update -y + dnf install --allowerasing git make g++ wget curl jq unzip -y + + git config --global --add safe.directory /workspace + git submodule init + git submodule update + + 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_9_Arm64.zip + unzip ./XEngine_RockyLinux_9_Arm64.zip -d ./XEngine_RockyLinux_9_Arm64 + cd XEngine_RockyLinux_9_Arm64 + + chmod 777 ./XEngine_LINEnv.sh + ./XEngine_LINEnv.sh -i 0 + + cp -rf ./XEngine_Include /usr/local/include + find ./XEngine_Linux -name "*.so" -exec cp {} /usr/lib64 \; + ldconfig + cd .. + + cd XEngine_Source + make ARCH=Arm64 RELEASE=1 + make FLAGS=InstallAll + make FLAGS=CleanAll + cd .. + + cd XEngine_Release + ./XEngine_ProxyServiceApp -t + chown -R $(id -u):$(id -g) . + chmod -R a+r . ' + + - name: Upload folder as artifact with RockyLinux + uses: actions/upload-artifact@v4 + with: + name: XEngine_ProxyServiceApp-RockyLinux_9_Arm64 + path: XEngine_Release/ + retention-days: 1 diff --git a/.github/workflows/RockyX86_64_build.yml b/.github/workflows/RockyX86_64_build.yml new file mode 100644 index 0000000000000000000000000000000000000000..de6579e36a273924fd4b7b6c6afd91049dbea3ca --- /dev/null +++ b/.github/workflows/RockyX86_64_build.yml @@ -0,0 +1,83 @@ +name: rocky x86_64 build workflows + +on: + push: + branches: + - 'develop' + paths: + - 'XEngine_Source/**' + - 'XEngine_Release/**' + - '.github/**' + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + container: + image: rockylinux/rockylinux:9.5 + + steps: + # 检出您的主仓库代码 + - name: Checkout main repository code + uses: actions/checkout@v4 + with: + ref: 'develop' + + # 检出依赖的xengine仓库到指定的xengine目录 + - 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_Depend + + - name: install system package + run: | + dnf update -y + dnf install gcc g++ make git jq unzip -y + # 设置依赖库的环境变量 + - name: Set up Dependency rocky linux Environment + run: | + cd libxengine + chmod 777 * + ./XEngine_LINEnv.sh -i 0 + - 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_9_x86-64.zip + unzip ./XEngine_RockyLinux_9_x86-64.zip -d ./XEngine_RockyLinux_9_x86-64 + cd XEngine_RockyLinux_9_x86-64 + + cp -rf ./XEngine_Include /usr/local/include + find ./XEngine_Linux -name "*.so" -exec cp {} /usr/lib64 \; + ldconfig + + - 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 RockyLinux + uses: actions/upload-artifact@v4 + with: + name: XEngine_ProxyServiceApp-RockyLinux_9_x86_64 + path: XEngine_Release/ + retention-days: 1 diff --git a/.github/workflows/UbuntuArm64_build.yml b/.github/workflows/UbuntuArm64_build.yml new file mode 100644 index 0000000000000000000000000000000000000000..8a898fcebb98a889867defc0d8856d77be054b96 --- /dev/null +++ b/.github/workflows/UbuntuArm64_build.yml @@ -0,0 +1,74 @@ +name: ubuntu Arm64 build workflows + +on: + push: + branches: + - 'develop' + paths: + - 'XEngine_Source/**' + - 'XEngine_Release/**' + - '.github/**' + +jobs: + build: + runs-on: ubuntu-24.04 + env: + IMAGE_NAME: ubuntu:24.04 + + strategy: + fail-fast: false + matrix: + arch: [linux/arm64] + + steps: + - name: Checkout main repository code + uses: actions/checkout@v4 + with: + ref: 'develop' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Build ${{ matrix.arch }} + run: | + docker run --platform ${{ matrix.arch }} --rm \ + -v ${{ github.workspace }}:/workspace \ + -w /workspace ${{ env.IMAGE_NAME }} /bin/sh -c ' + set -e + apt update -y + apt install git make g++ wget curl jq unzip -y + + git config --global --add safe.directory /workspace + git submodule init + git submodule update + + 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_UBuntu_24.04_Arm64.zip + unzip ./XEngine_UBuntu_24.04_Arm64.zip -d ./XEngine_UBuntu_24.04_Arm64 + cd XEngine_UBuntu_24.04_Arm64 + + chmod 777 ./XEngine_LINEnv.sh + ./XEngine_LINEnv.sh -i 0 + + cp -rf ./XEngine_Include /usr/local/include + find ./XEngine_Linux -name "*.so" -exec cp {} /usr/local/lib \; + ldconfig + cd .. + + cd XEngine_Source + make ARCH=Arm64 RELEASE=1 + make FLAGS=InstallAll + make FLAGS=CleanAll + cd .. + + cd XEngine_Release + ./XEngine_ProxyServiceApp -t + chown -R $(id -u):$(id -g) . + chmod -R a+r . ' + + - name: Upload folder as artifact with ubuntu Arm64 + uses: actions/upload-artifact@v4 + with: + name: XEngine_ProxyServiceApp-Ubuntu_24.04_Arm64 + 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 9b860238ef1d5e7a0297fd975fcc12ee8d3a2220..b069251ed3b53c8f11d9fb4840dbfdb0bd982817 100644 --- a/.github/workflows/macbuild.yml +++ b/.github/workflows/macbuild.yml @@ -84,11 +84,13 @@ jobs: if: matrix.os == 'macos-13' uses: actions/upload-artifact@v4 with: - name: XEngine_ProxyServiceApp-x86_64-Mac + 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' uses: actions/upload-artifact@v4 with: - name: XEngine_ProxyServiceApp-Arm64-Mac - path: XEngine_Release/ \ No newline at end of file + name: XEngine_ProxyServiceApp-Mac_Arm64 + path: XEngine_Release/ + retention-days: 1 \ No newline at end of file diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 34374215ec0ab62c5568aa9c233d761c39e19de0..dd727dbfbd06e5baa08ff3972d0ea044ed2a5f20 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: configuration: [Debug ,Release] - platform: [x86 ,x64] + platform: [x86 ,x64, ARM64] runs-on: windows-latest # 最新的 Windows 环境 @@ -59,7 +59,21 @@ jobs: echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append shell: pwsh - + - name: Set up Dependency ARM64 Environment + if: matrix.platform == 'ARM64' + run: | + $response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"} + $latest_tag = $response.tag_name + Write-Host "Latest Tag: $latest_tag" + + $url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_Arm64.zip" + Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_Arm64.zip" + Expand-Archive -Path ./XEngine_Windows_Arm64.zip -DestinationPath ./XEngine_Windows -Force + + echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "XENGINE_LIBARM64=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append + shell: pwsh + - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 @@ -85,17 +99,34 @@ jobs: cd XEngine_Release ./VSCopy_x64.bat shell: pwsh - + - name: Conditional Step for ARM64 Release + if: matrix.configuration == 'Release' && matrix.platform == 'ARM64' + run: | + cp -r XEngine_Source/ARM64/Release/*.dll XEngine_Release/ + cp -r XEngine_Source/ARM64/Release/*.exe XEngine_Release/ + cp -r XEngine_Source/VSCopy_Arm64.bat XEngine_Release/ + cd XEngine_Release + ./VSCopy_Arm64.bat + shell: pwsh + - name: Upload folder as artifact with x86 if: matrix.configuration == 'Release' && matrix.platform == 'x64' uses: actions/upload-artifact@v4 with: - name: XEngine_ProxyServiceApp-x86_32-Windows + name: XEngine_ProxyServiceApp-Windows_x86_32 path: XEngine_Release/ - + retention-days: 1 - name: Upload folder as artifact with x64 if: matrix.configuration == 'Release' && matrix.platform == 'x64' uses: actions/upload-artifact@v4 with: - name: XEngine_ProxyServiceApp-x86_64-Windows - path: XEngine_Release/ \ No newline at end of file + name: XEngine_ProxyServiceApp-Windows_x86_64 + path: XEngine_Release/ + retention-days: 1 + - name: Upload folder as artifact with ARM64 + if: matrix.configuration == 'Release' && matrix.platform == 'ARM64' + uses: actions/upload-artifact@v4 + with: + name: XEngine_ProxyServiceApp-Windows_ARM64 + path: XEngine_Release/ + retention-days: 1 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d557be67bae6b37308b8fdb5826ecb04ba3bf321..2dda2ce4f014b6ca9a741d9c25de52a878476c86 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,18 +14,44 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - ref: 'develop' fetch-depth: 0 - - name: Download ubuntubuild + - name: Download x86_64 ubuntubuild uses: dawidd6/action-download-artifact@v6 with: - workflow: ubuntubuild.yml + workflow: ubuntu86_64_build.yml workflow_conclusion: success check_artifacts: false skip_unpack: true if_no_artifact_found: fail - path: ./ + path: ./XRelease/ + - name: Download Arm64 ubuntubuild + uses: dawidd6/action-download-artifact@v6 + with: + workflow: UbuntuArm64_build.yml + workflow_conclusion: success + check_artifacts: false + skip_unpack: true + if_no_artifact_found: fail + path: ./XRelease/ + - name: Download x86_64 Rockylinux + uses: dawidd6/action-download-artifact@v6 + with: + workflow: RockyX86_64_build.yml + workflow_conclusion: success + check_artifacts: false + skip_unpack: true + if_no_artifact_found: fail + path: ./XRelease/ + - name: Download Arm64 Rockylinux + uses: dawidd6/action-download-artifact@v6 + with: + workflow: RockyArm64_build.yml + workflow_conclusion: success + check_artifacts: false + skip_unpack: true + if_no_artifact_found: fail + path: ./XRelease/ - name: Download macbuild uses: dawidd6/action-download-artifact@v6 with: @@ -34,7 +60,7 @@ jobs: check_artifacts: false skip_unpack: true if_no_artifact_found: fail - path: ./ + path: ./XRelease/ - name: Download msbuild uses: dawidd6/action-download-artifact@v6 with: @@ -43,10 +69,10 @@ jobs: check_artifacts: false skip_unpack: true if_no_artifact_found: fail - path: ./ + path: ./XRelease/ - name: Display structure of downloaded files - run: ls -al ./ + run: ls -al ./XRelease/ - name: Get current version and increment X id: versioning @@ -88,8 +114,4 @@ jobs: tag_name: ${{ steps.versioning.outputs.new_tag }} name: XEngine_ProxyServiceApp ${{ steps.versioning.outputs.new_tag }} body_path: release_notes.txt - files: | - ./XEngine_ProxyServiceApp-x64-Mac.zip - ./XEngine_ProxyServiceApp-x64-Ubuntu.zip - ./XEngine_ProxyServiceApp-x64-Windows.zip - ./XEngine_ProxyServiceApp-x86-Windows.zip + files: ./XRelease/*.zip diff --git a/.github/workflows/ubuntubuild.yml b/.github/workflows/ubuntu86_64_build.yml similarity index 91% rename from .github/workflows/ubuntubuild.yml rename to .github/workflows/ubuntu86_64_build.yml index 9859e2ce51da5e40eed16c21cffd579eec262ed7..599e8fe2547dea40c3c1012e697f6dd4649e3b02 100644 --- a/.github/workflows/ubuntubuild.yml +++ b/.github/workflows/ubuntu86_64_build.yml @@ -1,4 +1,4 @@ -name: ubuntu build workflows +name: ubuntu x86_64 build workflows on: push: @@ -80,11 +80,13 @@ jobs: if: matrix.os == 'ubuntu-22.04' uses: actions/upload-artifact@v4 with: - name: XEngine_ProxyServiceApp-x86_64-Ubuntu-22.04 + name: XEngine_ProxyServiceApp-Ubuntu_22.04_x86_64 path: XEngine_Release/ + retention-days: 1 - name: Upload folder as artifact with ubuntu24.04 if: matrix.os == 'ubuntu-24.04' uses: actions/upload-artifact@v4 with: - name: XEngine_ProxyServiceApp-x86_64-Ubuntu-24.04 - path: XEngine_Release/ \ No newline at end of file + name: XEngine_ProxyServiceApp-Ubuntu_24.04_x86_64 + path: XEngine_Release/ + retention-days: 1 \ No newline at end of file diff --git a/CHANGELOG b/CHANGELOG index 8e969be7c2d35f8ab0fbfa7e05cfaa09342cfe33..d0693664542676599ea9e93d6c68029872a0c9aa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,33 @@ +XEngine_ProxyServer V1.12.0.1001 + +增加:windows arm64编译支持 +增加:更多发布构建支持 +更新:三方库 +优化:更多参数解析 +优化:转发协议代码 +修改:统一转发和隧道代理错误 +修改:匿名转发打印问题 +修改:全代理多后端支持 +修改:信息报告现在可以直接发送获取次数了 +修正:没有输出转发绑定错误信息的问题 +修正:转发网络的问题在接受数据时不会区分命名和匿名数据 +修正:匿名保存客户端地址丢失问题 +修正:隧道和SOCKS初始化协议没有响应 + +added:windows arm64 build support +added:release and build more support +update:depend library +improved:parameter parse more support +improved:forward protocol handle +modify:unified forward and tunnel error code +modify:print port for anny forward +modify:multi back-end support for proxy full +modify:get time when send for report info +fixed:not print forward bind error +fixed:issue with forwarding network not distinguishing between named and anonymized data when accepting data +fixed:anony save client addr lost port +fixed:tunnel and socks init protocol failed not response +====================================================================================== XEngine_ProxyServer V1.11.0.1001 增加:全代理转发模式支持 diff --git a/XEngine_APPClient/APPClient_ForwardExample/APPClient_ForwardExample.cpp b/XEngine_APPClient/APPClient_ForwardExample/APPClient_ForwardExample.cpp index c6282a84c32e592a9d6127bb1eecd669bb662475..c9383d8d167adb4455faca44f9a9cfbf0f6ab772 100644 --- a/XEngine_APPClient/APPClient_ForwardExample/APPClient_ForwardExample.cpp +++ b/XEngine_APPClient/APPClient_ForwardExample/APPClient_ForwardExample.cpp @@ -32,12 +32,8 @@ //linux使用下面的命令编译 //g++ -std=c++20 -Wall -g APPClient_ForwardExample.cpp -o APPClient_ForwardExample.exe -I ../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp -L ../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp -lXEngine_BaseLib -lXClient_Socket -lRfcComponents_ProxyProtocol -ljsoncpp -int main(int argc, char** argv) +int Proxy_NamedTest() { -#ifdef _MSC_BUILD - WSADATA st_WSAData; - WSAStartup(MAKEWORD(2, 2), &st_WSAData); -#endif XSOCKET m_Socket; LPCXSTR lpszServiceAddr = _X("127.0.0.1"); if (!XClient_TCPSelect_Create(&m_Socket, lpszServiceAddr, 5402)) @@ -184,11 +180,113 @@ int main(int argc, char** argv) BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer); } } - } + } } - std::this_thread::sleep_for(std::chrono::seconds(20000)); XClient_TCPSelect_Close(m_Socket); + return 0; +} +int Proxy_AnonyTest() +{ + XSOCKET m_Socket; + LPCXSTR lpszServiceAddr = _X("127.0.0.1"); + if (!XClient_TCPSelect_Create(&m_Socket, lpszServiceAddr, 5402)) + { + printf("连接失败!错误:%lX\n", XClient_GetLastError()); + return 0; + } + printf("连接成功!\n"); + + int nMsgLen = 0; + XENGINE_PROTOCOLHDR st_ProtocolHdr; + XENGINE_PROTOCOL_USERAUTH st_UserAuth; + + memset(&st_ProtocolHdr, '\0', sizeof(XENGINE_PROTOCOLHDR)); + memset(&st_UserAuth, '\0', sizeof(XENGINE_PROTOCOL_USERAUTH)); + //登录 + st_ProtocolHdr.wHeader = XENGIEN_COMMUNICATION_PACKET_PROTOCOL_HEADER; + st_ProtocolHdr.wTail = XENGIEN_COMMUNICATION_PACKET_PROTOCOL_TAIL; + st_ProtocolHdr.byIsReply = true; + 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; + + _tcsxcpy(st_UserAuth.tszUserName, "test"); + + if (!XClient_TCPSelect_SendMsg(m_Socket, (LPCXSTR)&st_ProtocolHdr, sizeof(XENGINE_PROTOCOLHDR))) + { + printf("发送失败!\n"); + return 0; + } + if (!XClient_TCPSelect_SendMsg(m_Socket, (LPCXSTR)&st_UserAuth, sizeof(XENGINE_PROTOCOL_USERAUTH))) + { + printf("发送失败!\n"); + return 0; + } + + nMsgLen = 0; + XCHAR* ptszMsgBuffer = NULL; + memset(&st_ProtocolHdr, '\0', sizeof(XENGINE_PROTOCOLHDR)); + if (!XClient_TCPSelect_RecvPkt(m_Socket, &ptszMsgBuffer, &nMsgLen, &st_ProtocolHdr)) + { + printf("接受数据失败!\n"); + return 0; + } + BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer); + //匿名转发请求 + Json::Value st_JsonRoot; + st_JsonRoot["tszDstAddr"] = "127.0.0.1:5401"; + + st_ProtocolHdr.wHeader = XENGIEN_COMMUNICATION_PACKET_PROTOCOL_HEADER; + st_ProtocolHdr.wTail = XENGIEN_COMMUNICATION_PACKET_PROTOCOL_TAIL; + st_ProtocolHdr.byIsReply = true; + st_ProtocolHdr.byVersion = 0; + st_ProtocolHdr.unPacketSize = st_JsonRoot.toStyledString().length(); + st_ProtocolHdr.unOperatorType = ENUM_XENGINE_COMMUNICATION_PROTOCOL_TYPE_USER_FORWARD; + st_ProtocolHdr.unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_ANONYREQ; + if (!XClient_TCPSelect_SendMsg(m_Socket, (LPCXSTR)&st_ProtocolHdr, sizeof(XENGINE_PROTOCOLHDR))) + { + printf("发送失败!\n"); + return 0; + } + if (!XClient_TCPSelect_SendMsg(m_Socket, st_JsonRoot.toStyledString().c_str(), st_ProtocolHdr.unPacketSize)) + { + printf("发送失败!\n"); + return 0; + } + nMsgLen = 2048; + if (!XClient_TCPSelect_RecvPkt(m_Socket, &ptszMsgBuffer, &nMsgLen, &st_ProtocolHdr)) + { + printf("接受数据失败!\n"); + return 0; + } + BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer); + //成功后发送数据 + XClient_TCPSelect_SendMsg(m_Socket, "hello", 5); + std::this_thread::sleep_for(std::chrono::seconds(1)); + printf("send 5 str\n"); + //接受数据 + nMsgLen = 2048; + XCHAR tszMsgBuffer[2048] = {}; + if (XClient_TCPSelect_RecvMsg(m_Socket, tszMsgBuffer, &nMsgLen)) + { + printf("%s\n", tszMsgBuffer); + } + + XClient_TCPSelect_Close(m_Socket); + return 0; +} + +int main(int argc, char** argv) +{ +#ifdef _MSC_BUILD + WSADATA st_WSAData; + WSAStartup(MAKEWORD(2, 2), &st_WSAData); +#endif + + Proxy_AnonyTest(); + Proxy_NamedTest(); #ifdef _MSC_BUILD WSACleanup(); #endif diff --git a/XEngine_Docment/Docment_en.docx b/XEngine_Docment/Docment_en.docx index e23c4c8d393ad6eb46babc8432ae7f515f16f0bd..34ebcc3ef02706a7b586fce00d6b87d6ed290368 100644 Binary files a/XEngine_Docment/Docment_en.docx and b/XEngine_Docment/Docment_en.docx differ diff --git a/XEngine_Docment/Docment_zh.docx b/XEngine_Docment/Docment_zh.docx index 37f84a6bf0b2bcc0a62ed3c31dd4d189b88518a8..8598b9739f7b551f06b4741338eae2a279651cfd 100644 Binary files a/XEngine_Docment/Docment_zh.docx and b/XEngine_Docment/Docment_zh.docx differ diff --git a/XEngine_Release/XEngine_Config/XEngine_Config.json b/XEngine_Release/XEngine_Config/XEngine_Config.json index 1bd949ffe4581ee187618ec45e135589b01da41e..849dfa7f3aaad4d66c8d83a2a18f490c59cdfced 100644 --- a/XEngine_Release/XEngine_Config/XEngine_Config.json +++ b/XEngine_Release/XEngine_Config/XEngine_Config.json @@ -31,7 +31,10 @@ "tszServiceName":"XEngine_ProxyServer" }, "XProxy": { - "bEnable": false, - "tszIPAddr": "10.0.2.6:5001" + "tszDefaultAddr": "10.0.4.69:5403", + "tszRuleIPAddr": [ + "10.0.0.1-10.0.4.69:5403", + "5000-10.0.4.69:5403" + ] } } \ No newline at end of file diff --git a/XEngine_Release/XEngine_Config/XEngine_Version.json b/XEngine_Release/XEngine_Config/XEngine_Version.json index 9cf6e52174cb97bb84b116a7e55c50a331e46b49..175bd8c47b0ded708a4e46f651a7a43c9f1fb49d 100644 --- a/XEngine_Release/XEngine_Config/XEngine_Version.json +++ b/XEngine_Release/XEngine_Config/XEngine_Version.json @@ -1,5 +1,6 @@ { "XVer": [ + "1.12.0.1001 Build20250325", "1.11.0.1001 Build20250121", "1.10.0.1001 Build20241115", "1.9.0.1001 Build20240910", diff --git a/XEngine_Source/VSCopy_Arm64.bat b/XEngine_Source/VSCopy_Arm64.bat new file mode 100644 index 0000000000000000000000000000000000000000..627ce5edf756c1333cebdeca10ecf275f134db58 --- /dev/null +++ b/XEngine_Source/VSCopy_Arm64.bat @@ -0,0 +1,20 @@ +copy /y "%XEngine_LibArm64%\XEngine_BaseLib\XEngine_BaseLib.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_BaseLib\XEngine_BaseSafe.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_BaseLib\XEngine_Algorithm.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_Core\XEngine_Core.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_Core\XEngine_Cryption.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_Core\XEngine_ManagePool.dll" "./" + +copy /y "%XEngine_LibArm64%\XEngine_Client\XClient_Socket.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_Client\XClient_APIHelp.dll" "./" + +copy /y "%XEngine_LibArm64%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_NetHelp\NetHelp_APIAddr.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_NetHelp\NetHelp_XSocket.dll" "./" + +copy /y "%XEngine_LibArm64%\XEngine_HelpComponents\HelpComponents_XLog.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_HelpComponents\HelpComponents_Packets.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_RfcComponents\RfcComponents_ProxyProtocol.dll" "./" + +copy /y "%XEngine_LibArm64%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_SystemSdk\XEngine_SystemConfig.dll" "./" \ No newline at end of file diff --git a/XEngine_Source/VSCopy_Debug.bat b/XEngine_Source/VSCopy_Debug.bat index 130c6b777334dec7c69146a188f9b7db7e11c5c2..bd94056a5e20c040229a4ca99afc40cd1f880107 100644 --- a/XEngine_Source/VSCopy_Debug.bat +++ b/XEngine_Source/VSCopy_Debug.bat @@ -1,4 +1,5 @@ copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_BaseLib.dll" "./" +copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_BaseSafe.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_Algorithm.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_Core.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_Cryption.dll" "./" @@ -15,4 +16,5 @@ copy /y "D:\XEngine\XEngine_SourceCode\Debug\HelpComponents_XLog.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\HelpComponents_Packets.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\RfcComponents_ProxyProtocol.dll" "./" -copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_SystemApi.dll" "./" \ No newline at end of file +copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_SystemApi.dll" "./" +copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_SystemConfig.dll" "./" \ No newline at end of file diff --git a/XEngine_Source/VSCopy_x64.bat b/XEngine_Source/VSCopy_x64.bat index d88263a37548f28ee1ba357d7aaf362354e3c83f..1fd95015d946264d41a89564c05d372d26833940 100644 --- a/XEngine_Source/VSCopy_x64.bat +++ b/XEngine_Source/VSCopy_x64.bat @@ -1,4 +1,5 @@ copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_BaseLib.dll" "./" +copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_BaseSafe.dll" "./" copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_Algorithm.dll" "./" copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_Core.dll" "./" copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_Cryption.dll" "./" @@ -15,4 +16,5 @@ copy /y "%XEngine_Lib64%\XEngine_HelpComponents\HelpComponents_XLog.dll" "./" copy /y "%XEngine_Lib64%\XEngine_HelpComponents\HelpComponents_Packets.dll" "./" copy /y "%XEngine_Lib64%\XEngine_RfcComponents\RfcComponents_ProxyProtocol.dll" "./" -copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./" \ No newline at end of file +copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./" +copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemConfig.dll" "./" \ No newline at end of file diff --git a/XEngine_Source/VSCopy_x86.bat b/XEngine_Source/VSCopy_x86.bat index 8fe09eb44e6ac0906cd9ab5bb4913d33ac48eeea..d65a0bd7712ab7d55b1c8dfe21f064fa00e53713 100644 --- a/XEngine_Source/VSCopy_x86.bat +++ b/XEngine_Source/VSCopy_x86.bat @@ -1,4 +1,5 @@ copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_BaseLib.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_BaseSafe.dll" "./" copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_Algorithm.dll" "./" copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_Core.dll" "./" copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_Cryption.dll" "./" @@ -15,4 +16,5 @@ copy /y "%XEngine_Lib32%\XEngine_HelpComponents\HelpComponents_XLog.dll" "./" copy /y "%XEngine_Lib32%\XEngine_HelpComponents\HelpComponents_Packets.dll" "./" copy /y "%XEngine_Lib32%\XEngine_RfcComponents\RfcComponents_ProxyProtocol.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./" \ No newline at end of file +copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemConfig.dll" "./" \ No newline at end of file diff --git a/XEngine_Source/XEngine.sln b/XEngine_Source/XEngine.sln index ab863a97bcf8a381c8d23bcbb8c3e32d2d919cb1..93076f1e7211a6b6f95a55a54458a8b72a3a7c99 100644 --- a/XEngine_Source/XEngine.sln +++ b/XEngine_Source/XEngine.sln @@ -40,56 +40,82 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XEngine_InfoReport", "XEngi EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 + Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B94018F9-541B-4BE4-A2A8-AD49DD35357B}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {B94018F9-541B-4BE4-A2A8-AD49DD35357B}.Debug|ARM64.Build.0 = Debug|ARM64 {B94018F9-541B-4BE4-A2A8-AD49DD35357B}.Debug|x64.ActiveCfg = Debug|x64 {B94018F9-541B-4BE4-A2A8-AD49DD35357B}.Debug|x64.Build.0 = Debug|x64 {B94018F9-541B-4BE4-A2A8-AD49DD35357B}.Debug|x86.ActiveCfg = Debug|Win32 {B94018F9-541B-4BE4-A2A8-AD49DD35357B}.Debug|x86.Build.0 = Debug|Win32 + {B94018F9-541B-4BE4-A2A8-AD49DD35357B}.Release|ARM64.ActiveCfg = Release|ARM64 + {B94018F9-541B-4BE4-A2A8-AD49DD35357B}.Release|ARM64.Build.0 = Release|ARM64 {B94018F9-541B-4BE4-A2A8-AD49DD35357B}.Release|x64.ActiveCfg = Release|x64 {B94018F9-541B-4BE4-A2A8-AD49DD35357B}.Release|x64.Build.0 = Release|x64 {B94018F9-541B-4BE4-A2A8-AD49DD35357B}.Release|x86.ActiveCfg = Release|Win32 {B94018F9-541B-4BE4-A2A8-AD49DD35357B}.Release|x86.Build.0 = Release|Win32 + {F54F152C-594F-4465-A44E-2DB915B39760}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {F54F152C-594F-4465-A44E-2DB915B39760}.Debug|ARM64.Build.0 = Debug|ARM64 {F54F152C-594F-4465-A44E-2DB915B39760}.Debug|x64.ActiveCfg = Debug|x64 {F54F152C-594F-4465-A44E-2DB915B39760}.Debug|x64.Build.0 = Debug|x64 {F54F152C-594F-4465-A44E-2DB915B39760}.Debug|x86.ActiveCfg = Debug|Win32 {F54F152C-594F-4465-A44E-2DB915B39760}.Debug|x86.Build.0 = Debug|Win32 + {F54F152C-594F-4465-A44E-2DB915B39760}.Release|ARM64.ActiveCfg = Release|ARM64 + {F54F152C-594F-4465-A44E-2DB915B39760}.Release|ARM64.Build.0 = Release|ARM64 {F54F152C-594F-4465-A44E-2DB915B39760}.Release|x64.ActiveCfg = Release|x64 {F54F152C-594F-4465-A44E-2DB915B39760}.Release|x64.Build.0 = Release|x64 {F54F152C-594F-4465-A44E-2DB915B39760}.Release|x86.ActiveCfg = Release|Win32 {F54F152C-594F-4465-A44E-2DB915B39760}.Release|x86.Build.0 = Release|Win32 + {237AF017-9AD2-44D8-A6C4-ECDEF7674FF2}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {237AF017-9AD2-44D8-A6C4-ECDEF7674FF2}.Debug|ARM64.Build.0 = Debug|ARM64 {237AF017-9AD2-44D8-A6C4-ECDEF7674FF2}.Debug|x64.ActiveCfg = Debug|x64 {237AF017-9AD2-44D8-A6C4-ECDEF7674FF2}.Debug|x64.Build.0 = Debug|x64 {237AF017-9AD2-44D8-A6C4-ECDEF7674FF2}.Debug|x86.ActiveCfg = Debug|Win32 {237AF017-9AD2-44D8-A6C4-ECDEF7674FF2}.Debug|x86.Build.0 = Debug|Win32 + {237AF017-9AD2-44D8-A6C4-ECDEF7674FF2}.Release|ARM64.ActiveCfg = Release|ARM64 + {237AF017-9AD2-44D8-A6C4-ECDEF7674FF2}.Release|ARM64.Build.0 = Release|ARM64 {237AF017-9AD2-44D8-A6C4-ECDEF7674FF2}.Release|x64.ActiveCfg = Release|x64 {237AF017-9AD2-44D8-A6C4-ECDEF7674FF2}.Release|x64.Build.0 = Release|x64 {237AF017-9AD2-44D8-A6C4-ECDEF7674FF2}.Release|x86.ActiveCfg = Release|Win32 {237AF017-9AD2-44D8-A6C4-ECDEF7674FF2}.Release|x86.Build.0 = Release|Win32 + {9512A610-7197-4522-9AEF-1486619C99FE}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {9512A610-7197-4522-9AEF-1486619C99FE}.Debug|ARM64.Build.0 = Debug|ARM64 {9512A610-7197-4522-9AEF-1486619C99FE}.Debug|x64.ActiveCfg = Debug|x64 {9512A610-7197-4522-9AEF-1486619C99FE}.Debug|x64.Build.0 = Debug|x64 {9512A610-7197-4522-9AEF-1486619C99FE}.Debug|x86.ActiveCfg = Debug|Win32 {9512A610-7197-4522-9AEF-1486619C99FE}.Debug|x86.Build.0 = Debug|Win32 + {9512A610-7197-4522-9AEF-1486619C99FE}.Release|ARM64.ActiveCfg = Release|ARM64 + {9512A610-7197-4522-9AEF-1486619C99FE}.Release|ARM64.Build.0 = Release|ARM64 {9512A610-7197-4522-9AEF-1486619C99FE}.Release|x64.ActiveCfg = Release|x64 {9512A610-7197-4522-9AEF-1486619C99FE}.Release|x64.Build.0 = Release|x64 {9512A610-7197-4522-9AEF-1486619C99FE}.Release|x86.ActiveCfg = Release|Win32 {9512A610-7197-4522-9AEF-1486619C99FE}.Release|x86.Build.0 = Release|Win32 + {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Debug|ARM64.Build.0 = Debug|ARM64 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Debug|x64.ActiveCfg = Debug|x64 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Debug|x64.Build.0 = Debug|x64 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Debug|x86.ActiveCfg = Debug|Win32 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Debug|x86.Build.0 = Debug|Win32 + {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Release|ARM64.ActiveCfg = Release|ARM64 + {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Release|ARM64.Build.0 = Release|ARM64 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Release|x64.ActiveCfg = Release|x64 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Release|x64.Build.0 = Release|x64 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Release|x86.ActiveCfg = Release|Win32 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Release|x86.Build.0 = Release|Win32 + {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Debug|ARM64.Build.0 = Debug|ARM64 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Debug|x64.ActiveCfg = Debug|x64 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Debug|x64.Build.0 = Debug|x64 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Debug|x86.ActiveCfg = Debug|Win32 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Debug|x86.Build.0 = Debug|Win32 + {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Release|ARM64.ActiveCfg = Release|ARM64 + {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Release|ARM64.Build.0 = Release|ARM64 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Release|x64.ActiveCfg = Release|x64 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Release|x64.Build.0 = Release|x64 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Release|x86.ActiveCfg = Release|Win32 diff --git a/XEngine_Source/XEngine_Depend b/XEngine_Source/XEngine_Depend index bcf8d946890a2f2fb39eec16e64a634a8ece52c7..fda9f7d9140cc6a32eecb499e2acb67e8e1c7e6f 160000 --- a/XEngine_Source/XEngine_Depend +++ b/XEngine_Source/XEngine_Depend @@ -1 +1 @@ -Subproject commit bcf8d946890a2f2fb39eec16e64a634a8ece52c7 +Subproject commit fda9f7d9140cc6a32eecb499e2acb67e8e1c7e6f diff --git a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h index e24ef5be6ffafe854d54ad3ea3ca3c06d91b72ca..e230a74c231c05218510766bf524787ddaa178e9 100644 --- a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h +++ b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h @@ -52,8 +52,8 @@ typedef struct tag_XEngine_ServiceConfig }st_XReport; struct { - XCHAR tszIPAddr[128]; - bool bEnable; + XCHAR tszDefaultAddr[128]; + std::list* pStl_ListRuleAddr; }st_XProxy; struct { diff --git a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp index 4a78c07b10f1820c767ec7788e701ca2f7ae33fa..9299982cbc834c45ec358e872ed48c76dfefc58e 100644 --- a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp +++ b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp @@ -138,16 +138,23 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE _tcsxcpy(pSt_ServerConfig->st_XReport.tszAPIUrl, st_JsonXReport["tszAPIUrl"].asCString()); _tcsxcpy(pSt_ServerConfig->st_XReport.tszServiceName, st_JsonXReport["tszServiceName"].asCString()); - if (st_JsonRoot["XProxy"].empty() || (2 != st_JsonRoot["XProxy"].size())) + if (st_JsonRoot["XProxy"].empty()) { Config_IsErrorOccur = true; Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_XPROXY; return false; } Json::Value st_JsonXProxy = st_JsonRoot["XProxy"]; - pSt_ServerConfig->st_XProxy.bEnable = st_JsonXProxy["bEnable"].asBool(); - _tcsxcpy(pSt_ServerConfig->st_XProxy.tszIPAddr, st_JsonXProxy["tszIPAddr"].asCString()); + pSt_ServerConfig->st_XProxy.pStl_ListRuleAddr = new list; + _tcsxcpy(pSt_ServerConfig->st_XProxy.tszDefaultAddr, st_JsonXProxy["tszDefaultAddr"].asCString()); + if (!st_JsonXProxy["tszRuleIPAddr"].isNull()) + { + for (unsigned int i = 0; i < st_JsonXProxy["tszRuleIPAddr"].size(); i++) + { + pSt_ServerConfig->st_XProxy.pStl_ListRuleAddr->push_back(st_JsonXProxy["tszRuleIPAddr"][i].asCString()); + } + } return true; } /******************************************************************** diff --git a/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj b/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj index dbae19ba31ce88ee66d717178517b525f553232f..a214de53a1a73549827a237517d4bd39372aef4f 100644 --- a/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj +++ b/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -45,6 +53,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -52,6 +66,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -66,9 +87,15 @@ + + + + + + true @@ -85,11 +112,21 @@ $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + true + $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + false $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + false + $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + Level3 @@ -152,6 +189,24 @@ XEngine_ModuleConfigure.def + + + Level3 + true + _DEBUG;XENGINEMODULECONFIGURE_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + stdcpp20 + stdc17 + + + Windows + true + false + XEngine_ModuleConfigure.def + + Level3 @@ -177,6 +232,31 @@ XEngine_ModuleConfigure.def + + + Level3 + true + true + true + NDEBUG;XENGINEMODULECONFIGURE_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + MultiThreaded + 4819 + stdcpp20 + stdc17 + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + XEngine_ModuleConfigure.def + + @@ -190,8 +270,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_ModuleConfigure/pch.h b/XEngine_Source/XEngine_ModuleConfigure/pch.h index 81e37dd5a2e86690e782d70eb3bde630d8ccdb0e..356a7751367e90c9404a12d214cd3db96e1fc3c4 100644 --- a/XEngine_Source/XEngine_ModuleConfigure/pch.h +++ b/XEngine_Source/XEngine_ModuleConfigure/pch.h @@ -40,16 +40,20 @@ extern XLONG Config_dwErrorCode; #ifdef _MSC_BUILD #ifdef _DEBUG -#ifdef _WIN64 -#pragma comment(lib,"../x64/Debug/jsoncpp") -#else -#pragma comment(lib,"../Debug/jsoncpp") +#ifdef _M_X64 +#pragma comment(lib,"../x64/Debug/jsoncpp.lib") +#elif _M_ARM64 +#pragma comment(lib,"../ARM64/Debug/jsoncpp.lib") +#elif _M_IX86 +#pragma comment(lib,"../Debug/jsoncpp.lib") #endif #else -#ifdef _WIN64 -#pragma comment(lib,"../x64/Release/jsoncpp") -#else -#pragma comment(lib,"../Release/jsoncpp") +#ifdef _M_X64 +#pragma comment(lib,"../x64/Release/jsoncpp.lib") +#elif _M_ARM64 +#pragma comment(lib,"../ARM64/Release/jsoncpp.lib") +#elif _M_IX86 +#pragma comment(lib,"../Release/jsoncpp.lib") #endif #endif #endif \ No newline at end of file diff --git a/XEngine_Source/XEngine_ModuleProtocol/XEngine_ModuleProtocol.vcxproj b/XEngine_Source/XEngine_ModuleProtocol/XEngine_ModuleProtocol.vcxproj index 644902c62ed9765d74ea406f47c7f3c7ceae4f21..7595bb0878b185d91a6a5ad53dd001448963b8f4 100644 --- a/XEngine_Source/XEngine_ModuleProtocol/XEngine_ModuleProtocol.vcxproj +++ b/XEngine_Source/XEngine_ModuleProtocol/XEngine_ModuleProtocol.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -45,6 +53,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -52,6 +66,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -66,9 +87,15 @@ + + + + + + $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) @@ -81,9 +108,15 @@ $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + + $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + + $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + Level3 @@ -143,6 +176,24 @@ XEngine_ModuleProtocol.def + + + Level3 + true + _DEBUG;XENGINEMODULEPROTOCOL_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + stdcpp20 + stdc17 + + + Windows + true + false + XEngine_ModuleProtocol.def + + Level3 @@ -166,6 +217,29 @@ XEngine_ModuleProtocol.def + + + Level3 + true + true + true + NDEBUG;XENGINEMODULEPROTOCOL_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + stdcpp20 + stdc17 + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + XEngine_ModuleProtocol.def + + @@ -181,8 +255,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_ModuleProtocol/pch.h b/XEngine_Source/XEngine_ModuleProtocol/pch.h index f3bc0883becf6d46928edc9062607af2790571b0..944153fd62691e7c87d0532d4d43331188202fe8 100644 --- a/XEngine_Source/XEngine_ModuleProtocol/pch.h +++ b/XEngine_Source/XEngine_ModuleProtocol/pch.h @@ -41,16 +41,20 @@ extern XLONG Protocol_dwErrorCode; #ifdef _MSC_BUILD #ifdef _DEBUG -#ifdef _WIN64 -#pragma comment(lib,"../x64/Debug/jsoncpp") -#else -#pragma comment(lib,"../Debug/jsoncpp") +#ifdef _M_X64 +#pragma comment(lib,"../x64/Debug/jsoncpp.lib") +#elif _M_ARM64 +#pragma comment(lib,"../ARM64/Debug/jsoncpp.lib") +#elif _M_IX86 +#pragma comment(lib,"../Debug/jsoncpp.lib") #endif #else -#ifdef _WIN64 -#pragma comment(lib,"../x64/Release/jsoncpp") -#else -#pragma comment(lib,"../Release/jsoncpp") +#ifdef _M_X64 +#pragma comment(lib,"../x64/Release/jsoncpp.lib") +#elif _M_ARM64 +#pragma comment(lib,"../ARM64/Release/jsoncpp.lib") +#elif _M_IX86 +#pragma comment(lib,"../Release/jsoncpp.lib") #endif #endif #endif \ No newline at end of file diff --git a/XEngine_Source/XEngine_ModuleSession/XEngine_ModuleSession.vcxproj b/XEngine_Source/XEngine_ModuleSession/XEngine_ModuleSession.vcxproj index 643e738fad396b5a9bbe61fe0624310048a51df7..c36ef886fd4b4dc2dc40d7bad407e383389b0079 100644 --- a/XEngine_Source/XEngine_ModuleSession/XEngine_ModuleSession.vcxproj +++ b/XEngine_Source/XEngine_ModuleSession/XEngine_ModuleSession.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -45,6 +53,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -52,6 +66,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -66,9 +87,15 @@ + + + + + + $(XEngine_Include);..\XEngine_ModuleSession;$(IncludePath) @@ -82,10 +109,18 @@ $(XEngine_Include);$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + $(XEngine_Include);$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + $(XEngine_Include);$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + $(XEngine_Include);$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + Level3 @@ -145,6 +180,24 @@ XEngine_ModuleSession.def + + + Level3 + true + _DEBUG;XENGINEMODULESESSION_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + stdcpp20 + stdc17 + + + Windows + true + false + XEngine_ModuleSession.def + + Level3 @@ -168,6 +221,29 @@ XEngine_ModuleSession.def + + + Level3 + true + true + true + NDEBUG;XENGINEMODULESESSION_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + stdcpp20 + stdc17 + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + XEngine_ModuleSession.def + + @@ -187,8 +263,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_Configure.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_Configure.cpp index 1a5c9228af95ae1505b7aab2478652c0c94c412c..f98dfdb792d628c65029b06963f74079f9f66caa 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_Configure.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_Configure.cpp @@ -37,10 +37,30 @@ bool XEngine_Configure_Parament(int argc, char** argv, XENGINE_SERVICECONFIG* pS { pSt_Configure->bDeamon = _ttxoi(argv[++i]); } - else if (0 == _tcsxcmp("-l", argv[i])) + else if (0 == _tcsxcmp("-ps", argv[i])) + { + st_ServiceConfig.nSocksPort = _ttxoi(argv[++i]); + } + else if (0 == _tcsxcmp("-pt", argv[i])) + { + st_ServiceConfig.nTunnelPort = _ttxoi(argv[++i]); + } + else if (0 == _tcsxcmp("-pf", argv[i])) + { + st_ServiceConfig.nForwardPort = _ttxoi(argv[++i]); + } + else if (0 == _tcsxcmp("-pp", argv[i])) + { + st_ServiceConfig.nProxyPort = _ttxoi(argv[++i]); + } + else if (0 == _tcsxcmp("-ll", argv[i])) { pSt_Configure->st_XLog.nLogLeave = _ttxoi(argv[++i]); } + else if (0 == _tcsxcmp("-lt", argv[i])) + { + pSt_Configure->st_XLog.nLogType = _ttxoi(argv[++i]); + } else if (0 == _tcsxcmp("-v", argv[i])) { string m_StrVersion = st_ServiceConfig.st_XVer.pStl_ListVer->front(); diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_ForwardTask.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_ForwardTask.cpp index bb883d9f502fb7d06219ac93a113f6d0e053d4da..390d4ef6957eb42d31aa56ea8e7fb7904ef46c56 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_ForwardTask.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_ForwardTask.cpp @@ -63,13 +63,20 @@ bool XEngine_Forward_Handle(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int n 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); } + else + { + pSt_ProtocolHdr->wReserve = ERROR_XENGINE_PROXY_PROTOCOL_NOTSUPPORT; + pSt_ProtocolHdr->unPacketSize = 0; + 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,发送了不支持的验证协议:%d"), lpszClientAddr, pSt_ProtocolHdr->unOperatorCode); + } } - //处理转发协议 - if (ENUM_XENGINE_COMMUNICATION_PROTOCOL_TYPE_USER_FORWARD == pSt_ProtocolHdr->unOperatorType) + else if (ENUM_XENGINE_COMMUNICATION_PROTOCOL_TYPE_USER_FORWARD == pSt_ProtocolHdr->unOperatorType) { + //处理转发协议 if (!ModuleSession_Forward_Get(lpszClientAddr)) { - pSt_ProtocolHdr->wReserve = 401; + pSt_ProtocolHdr->wReserve = ERROR_XENGINE_PROXY_PROTOCOL_NOTLOGIN; pSt_ProtocolHdr->unPacketSize = 0; pSt_ProtocolHdr->unOperatorCode = pSt_ProtocolHdr->unOperatorCode + 1; XEngine_Network_Send(lpszClientAddr, (LPCXSTR)pSt_ProtocolHdr, sizeof(XENGINE_PROTOCOLHDR), XENGINE_CLIENT_NETTYPE_FORWARD); @@ -102,11 +109,11 @@ bool XEngine_Forward_Handle(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int n ModuleProtocol_Parse_ForwardBind(lpszMsgBuffer, nMsgLen, tszSrcAddr, tszDstAddr); if (!ModuleSession_Forward_BindNamed(lpszClientAddr, tszDstAddr)) { - pSt_ProtocolHdr->wReserve = 404; + pSt_ProtocolHdr->wReserve = ERROR_XENGINE_PROXY_PROTOCOL_NOTFOUND; pSt_ProtocolHdr->unPacketSize = 0; pSt_ProtocolHdr->unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_NAMEDREP; 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 失败,错误:%lX"), lpszClientAddr, tszDstAddr); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("Forward客户端:%s,请求命名绑定转发地址:%s 失败,错误:%lX"), lpszClientAddr, tszDstAddr, ModuleSession_GetLastError()); return false; } //先告知对方要转发数据 @@ -120,20 +127,19 @@ bool XEngine_Forward_Handle(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int n } else if (XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_ANONYREQ == pSt_ProtocolHdr->unOperatorCode) { - XCHAR tszSrcAddr[128]; - XCHAR tszDstAddr[128]; - - memset(tszSrcAddr, '\0', sizeof(tszSrcAddr)); - memset(tszDstAddr, '\0', sizeof(tszDstAddr)); + XCHAR tszSrcAddr[128] = {}; + XCHAR tszDstAddr[128] = {}; + XCHAR tszTmpAddr[128] = {}; ModuleProtocol_Parse_ForwardBind(lpszMsgBuffer, nMsgLen, tszSrcAddr, tszDstAddr); //匿名绑定,请求连接 int nPort = 0; XNETHANDLE xhClient = 0; - APIAddr_IPAddr_SegAddr(tszDstAddr, &nPort); - if (!XClient_TCPSelect_InsertEx(xhForwardClient, &xhClient, tszDstAddr, nPort)) + _tcsxcpy(tszTmpAddr, tszDstAddr); + APIAddr_IPAddr_SegAddr(tszTmpAddr, &nPort); + if (!XClient_TCPSelect_InsertEx(xhForwardClient, &xhClient, tszTmpAddr, nPort)) { - pSt_ProtocolHdr->wReserve = 500; + pSt_ProtocolHdr->wReserve = ERROR_XENGINE_PROXY_PROTOCOL_SERVER; pSt_ProtocolHdr->unPacketSize = 0; pSt_ProtocolHdr->unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_ANONYREP; XEngine_Network_Send(lpszClientAddr, (LPCXSTR)pSt_ProtocolHdr, sizeof(XENGINE_PROTOCOLHDR), XENGINE_CLIENT_NETTYPE_FORWARD); @@ -142,11 +148,11 @@ bool XEngine_Forward_Handle(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int n } if (!ModuleSession_Forward_BindAnony(lpszClientAddr, tszDstAddr, xhClient)) { - pSt_ProtocolHdr->wReserve = 404; + pSt_ProtocolHdr->wReserve = ERROR_XENGINE_PROXY_PROTOCOL_NOTFOUND; pSt_ProtocolHdr->unPacketSize = 0; pSt_ProtocolHdr->unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_FORWARD_ANONYREP; 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 失败,错误:%lX"), lpszClientAddr, tszDstAddr); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("Forward客户端:%s,请求匿名绑定转发地址:%s 失败,错误:%lX"), lpszClientAddr, tszDstAddr, ModuleSession_GetLastError()); return false; } //返回结果 @@ -154,8 +160,21 @@ bool XEngine_Forward_Handle(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int n 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, tszDstAddr); } + else + { + pSt_ProtocolHdr->wReserve = ERROR_XENGINE_PROXY_PROTOCOL_NOTSUPPORT; + pSt_ProtocolHdr->unPacketSize = 0; + 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,发送了不支持的转发协议:%d"), lpszClientAddr, pSt_ProtocolHdr->unOperatorCode); + } + } + else + { + pSt_ProtocolHdr->wReserve = ERROR_XENGINE_PROXY_PROTOCOL_NOTSUPPORT; + pSt_ProtocolHdr->unPacketSize = 0; + 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,发送了不支持的协议:%d-%d"), lpszClientAddr, pSt_ProtocolHdr->unOperatorType, pSt_ProtocolHdr->unOperatorCode); } - return true; } void CALLBACK XEngine_Forward_CBRecv(XHANDLE xhToken, XNETHANDLE xhClient, XSOCKET hSocket, ENUM_XCLIENT_SOCKET_EVENTS enTCPClientEvents, LPCXSTR lpszMsgBuffer, int nLen, XPVOID lParam) diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_Hdr.h b/XEngine_Source/XEngine_ServiceApp/XEngine_Hdr.h index c533f310dab1a80403ef425f96463c9aac1149ac..ccf54c50563dccda44a427abc6205c70afeb374a 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_Hdr.h +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_Hdr.h @@ -119,42 +119,52 @@ typedef struct //连接库 #ifdef _MSC_BUILD -#ifdef _WIN64 +#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib.lib") +#pragma comment(lib,"XEngine_Core/XEngine_Core.lib") +#pragma comment(lib,"XEngine_Core/XEngine_ManagePool.lib") +#pragma comment(lib,"XEngine_Core/XEngine_Cryption.lib") +#pragma comment(lib,"XEngine_Client/XClient_Socket.lib") +#pragma comment(lib,"XEngine_NetHelp/NetHelp_APIHelp.lib") +#pragma comment(lib,"XEngine_NetHelp/NetHelp_APIAddr.lib") +#pragma comment(lib,"XEngine_NetHelp/NetHelp_XSocket.lib") +#pragma comment(lib,"XEngine_HelpComponents/HelpComponents_XLog.lib") +#pragma comment(lib,"XEngine_HelpComponents/HelpComponents_Packets.lib") +#pragma comment(lib,"XEngine_RfcComponents/RfcComponents_ProxyProtocol.lib") +#pragma comment(lib,"Ws2_32.lib") +#pragma comment(lib,"Dbghelp.lib") #ifdef _DEBUG +#ifdef _M_X64 #pragma comment(lib,"../x64/Debug/XEngine_InfoReport.lib") #pragma comment(lib,"../x64/Debug/XEngine_ModuleConfigure.lib") #pragma comment(lib,"../x64/Debug/XEngine_ModuleSession.lib") #pragma comment(lib,"../x64/Debug/XEngine_ModuleProtocol.lib") -#else -#pragma comment(lib,"../x64/Release/XEngine_InfoReport.lib") -#pragma comment(lib,"../x64/Release/XEngine_ModuleConfigure.lib") -#pragma comment(lib,"../x64/Release/XEngine_ModuleSession.lib") -#pragma comment(lib,"../x64/Release/XEngine_ModuleProtocol.lib") -#endif -#else -#ifdef _DEBUG +#elif _M_ARM64 +#pragma comment(lib,"../ARM64/Debug/XEngine_InfoReport.lib") +#pragma comment(lib,"../ARM64/Debug/XEngine_ModuleConfigure.lib") +#pragma comment(lib,"../ARM64/Debug/XEngine_ModuleSession.lib") +#pragma comment(lib,"../ARM64/Debug/XEngine_ModuleProtocol.lib") +#elif _M_IX86 #pragma comment(lib,"../Debug/XEngine_InfoReport.lib") #pragma comment(lib,"../Debug/XEngine_ModuleConfigure.lib") #pragma comment(lib,"../Debug/XEngine_ModuleSession.lib") #pragma comment(lib,"../Debug/XEngine_ModuleProtocol.lib") +#endif #else +#ifdef _M_X64 +#pragma comment(lib,"../x64/Release/XEngine_InfoReport.lib") +#pragma comment(lib,"../x64/Release/XEngine_ModuleConfigure.lib") +#pragma comment(lib,"../x64/Release/XEngine_ModuleSession.lib") +#pragma comment(lib,"../x64/Release/XEngine_ModuleProtocol.lib") +#elif _M_ARM64 +#pragma comment(lib,"../ARM64/Release/XEngine_InfoReport.lib") +#pragma comment(lib,"../ARM64/Release/XEngine_ModuleConfigure.lib") +#pragma comment(lib,"../ARM64/Release/XEngine_ModuleSession.lib") +#pragma comment(lib,"../ARM64/Release/XEngine_ModuleProtocol.lib") +#elif _M_IX86 #pragma comment(lib,"../Release/XEngine_InfoReport.lib") #pragma comment(lib,"../Release/XEngine_ModuleConfigure.lib") #pragma comment(lib,"../Release/XEngine_ModuleSession.lib") #pragma comment(lib,"../Release/XEngine_ModuleProtocol.lib") #endif #endif -#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib.lib") -#pragma comment(lib,"XEngine_Core/XEngine_Core.lib") -#pragma comment(lib,"XEngine_Core/XEngine_ManagePool.lib") -#pragma comment(lib,"XEngine_Core/XEngine_Cryption.lib") -#pragma comment(lib,"XEngine_Client/XClient_Socket.lib") -#pragma comment(lib,"XEngine_NetHelp/NetHelp_APIHelp.lib") -#pragma comment(lib,"XEngine_NetHelp/NetHelp_APIAddr.lib") -#pragma comment(lib,"XEngine_NetHelp/NetHelp_XSocket.lib") -#pragma comment(lib,"XEngine_HelpComponents/HelpComponents_XLog.lib") -#pragma comment(lib,"XEngine_HelpComponents/HelpComponents_Packets.lib") -#pragma comment(lib,"XEngine_RfcComponents/RfcComponents_ProxyProtocol.lib") -#pragma comment(lib,"Ws2_32.lib") -#pragma comment(lib,"Dbghelp.lib") #endif \ No newline at end of file diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_Network.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_Network.cpp index 4f08c1251c9f24b1b5db396229b9b1f987482f70..3b410458a27ab0fa47cccbff4519474cf36a917a 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_Network.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_Network.cpp @@ -71,8 +71,34 @@ void CALLBACK Network_Callback_ForwardRecv(LPCXSTR lpszClientAddr, XSOCKET hSock SESSION_FORWARD st_ForwardClinet = {}; if (ModuleSession_Forward_Get(lpszClientAddr, &st_ForwardClinet)) { - //如果有转发,直接转发 - XEngine_Network_Send(st_ForwardClinet.tszDstAddr, lpszRecvMsg, nMsgLen, XENGINE_CLIENT_NETTYPE_FORWARD); + if (st_ForwardClinet.bForward) + { + if (st_ForwardClinet.bAnony) + { + //匿名转发 + if (XClient_TCPSelect_SendEx(xhForwardClient, st_ForwardClinet.xhClient, lpszRecvMsg, nMsgLen)) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_DEBUG, _X("Forward客户端:%s,匿名转发数据成功,大小:%d"), lpszClientAddr, nMsgLen); + } + else + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("Forward客户端:%s,匿名转发数据失败,大小:%d,错误:%lX"), lpszClientAddr, nMsgLen, XClient_GetLastError()); + } + } + else + { + //非匿名转发 + XEngine_Network_Send(st_ForwardClinet.tszDstAddr, lpszRecvMsg, nMsgLen, XENGINE_CLIENT_NETTYPE_FORWARD); + } + } + else + { + //没有绑定转发,投递到包中处理 + if (!HelpComponents_Datas_PostEx(xhForwardPacket, lpszClientAddr, lpszRecvMsg, nMsgLen)) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("Forward客户端:%s,投递数据包失败,大小:%d,错误:%lX"), lpszClientAddr, nMsgLen, Packets_GetLastError()); + } + } } else { diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_ProxyTask.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_ProxyTask.cpp index 8d50cac597e749b710674f8730186e1d188ccaa2..a73f2308284907d72643cf21756792f227b60a84 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_ProxyTask.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_ProxyTask.cpp @@ -10,36 +10,75 @@ // Purpose: 代理服务协议 // History: *********************************************************************/ -void CALLBACK XEngine_Proxy_CBRecv(XHANDLE xhToken, XNETHANDLE xhClient, XSOCKET hSocket, ENUM_XCLIENT_SOCKET_EVENTS enTCPClientEvents, LPCXSTR lpszMsgBuffer, int nMsgLen, XPVOID lParam) -{ - SESSION_FORWARD st_ProxyInfo = {}; - if (!ModuleSession_Proxy_GetForToken(xhClient, &st_ProxyInfo)) - { - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("Proxy客户端:%lld,获取转发地址信息失败,原始地址:%s,目标地址:%s,错误码:%lX"), xhClient, st_ProxyInfo.tszSrcAddr, st_ProxyInfo.tszDstAddr, ModuleSession_GetLastError()); - return; - } - XEngine_Network_Send(st_ProxyInfo.tszSrcAddr, lpszMsgBuffer, nMsgLen, XENGINE_CLIENT_NETTYPE_PROXY); - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_DEBUG, _X("Proxy客户端:%lld,转发数据成功,原始地址:%s,目标地址:%s,大小:%d"), xhClient, st_ProxyInfo.tszSrcAddr, st_ProxyInfo.tszDstAddr, nMsgLen); -} - bool XEngine_Proxy_Connect(LPCXSTR lpszClientAddr) { - int nPort = 0; + int nSrcPort = 0; + int nDstPort = 0; XNETHANDLE xhClient = 0; XCHAR tszIPAddr[128] = {}; + XCHAR tszSrcIPAddr[128] = {}; + XCHAR tszDstIPAddr[128] = {}; - _tcsxcpy(tszIPAddr, st_ServiceConfig.st_XProxy.tszIPAddr); - APIAddr_IPAddr_SegAddr(tszIPAddr, &nPort); - if (!XClient_TCPSelect_InsertEx(xhProxyClient, &xhClient, tszIPAddr, nPort, false)) + _tcsxcpy(tszSrcIPAddr, lpszClientAddr); + APIAddr_IPAddr_SegAddr(tszSrcIPAddr, &nSrcPort); + + bool bFound = false; + auto stl_ListIterator = st_ServiceConfig.st_XProxy.pStl_ListRuleAddr->begin(); + for (; stl_ListIterator != st_ServiceConfig.st_XProxy.pStl_ListRuleAddr->end(); stl_ListIterator++) { - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("Proxy客户端:%s,连接到转发代理服务器失败,服务地址:%s,错误码:%lX"), lpszClientAddr, st_ServiceConfig.st_XProxy.tszIPAddr, XClient_GetLastError()); + XCHAR tszTmpIPAddr[128] = {}; + _stxscanf(stl_ListIterator->c_str(), _X("%[^-]-%s"), tszTmpIPAddr, tszDstIPAddr); + if (APIAddr_IPAddr_IsIPV4Addr(tszTmpIPAddr)) + { + //ip + if (0 == _tcsxnicmp(tszSrcIPAddr, tszTmpIPAddr, _tcsxlen(tszSrcIPAddr))) + { + bFound = true; + _tcsxcpy(tszIPAddr, tszDstIPAddr); + APIAddr_IPAddr_SegAddr(tszDstIPAddr, &nDstPort); + break; + } + } + else + { + //port + if (_ttxoi(tszTmpIPAddr) == nSrcPort) + { + bFound = true; + _tcsxcpy(tszIPAddr, tszDstIPAddr); + APIAddr_IPAddr_SegAddr(tszDstIPAddr, &nDstPort); + break; + } + } + } + + if (!bFound) + { + _tcsxcpy(tszDstIPAddr, st_ServiceConfig.st_XProxy.tszDefaultAddr); + APIAddr_IPAddr_SegAddr(tszDstIPAddr, &nDstPort); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("Proxy客户端:%s,代理转未命中,使用默认地址:%s:%d"), lpszClientAddr, tszDstIPAddr, nDstPort); + } + if (!XClient_TCPSelect_InsertEx(xhProxyClient, &xhClient, tszDstIPAddr, nDstPort, false)) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("Proxy客户端:%s,连接到转发代理服务器失败,服务地址:%s:%d,错误码:%lX"), lpszClientAddr, tszDstIPAddr, nDstPort, XClient_GetLastError()); return false; } SocketOpt_HeartBeat_InsertAddrEx(xhProxyHeart, lpszClientAddr); - ModuleSession_Proxy_Insert(lpszClientAddr, st_ServiceConfig.st_XProxy.tszIPAddr, xhClient); - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("Proxy客户端:%s,连接到服务器:%s 成功"), lpszClientAddr, st_ServiceConfig.st_XProxy.tszIPAddr); + ModuleSession_Proxy_Insert(lpszClientAddr, tszIPAddr, xhClient); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("Proxy客户端:%s,连接到服务器:%s:%d 成功"), lpszClientAddr, tszDstIPAddr, nDstPort); return true; } +void CALLBACK XEngine_Proxy_CBRecv(XHANDLE xhToken, XNETHANDLE xhClient, XSOCKET hSocket, ENUM_XCLIENT_SOCKET_EVENTS enTCPClientEvents, LPCXSTR lpszMsgBuffer, int nMsgLen, XPVOID lParam) +{ + SESSION_FORWARD st_ProxyInfo = {}; + if (!ModuleSession_Proxy_GetForToken(xhClient, &st_ProxyInfo)) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("Proxy客户端:%lld,获取转发地址信息失败,原始地址:%s,目标地址:%s,错误码:%lX"), xhClient, st_ProxyInfo.tszSrcAddr, st_ProxyInfo.tszDstAddr, ModuleSession_GetLastError()); + return; + } + XEngine_Network_Send(st_ProxyInfo.tszSrcAddr, lpszMsgBuffer, nMsgLen, XENGINE_CLIENT_NETTYPE_PROXY); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_DEBUG, _X("Proxy客户端:%lld,转发数据成功,原始地址:%s,目标地址:%s,大小:%d"), xhClient, st_ProxyInfo.tszSrcAddr, st_ProxyInfo.tszDstAddr, nMsgLen); +} bool XEngine_Proxy_Recvmsg(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int nMsgLen) { SESSION_FORWARD st_ProxyInfo = {}; diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_ProxyTask.h b/XEngine_Source/XEngine_ServiceApp/XEngine_ProxyTask.h index 8d1f968bf185729a884bc9dd572c98f0760420e5..29db250abf53781088100d48fc9c81b172ac98ce 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_ProxyTask.h +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_ProxyTask.h @@ -10,6 +10,6 @@ // Purpose: 代理转发协议 // History: *********************************************************************/ -void CALLBACK XEngine_Proxy_CBRecv(XHANDLE xhToken, XNETHANDLE xhClient, XSOCKET hSocket, ENUM_XCLIENT_SOCKET_EVENTS enTCPClientEvents, LPCXSTR lpszMsgBuffer, int nMsgLen, XPVOID lParam); bool XEngine_Proxy_Connect(LPCXSTR lpszClientAddr); +void CALLBACK XEngine_Proxy_CBRecv(XHANDLE xhToken, XNETHANDLE xhClient, XSOCKET hSocket, ENUM_XCLIENT_SOCKET_EVENTS enTCPClientEvents, LPCXSTR lpszMsgBuffer, int nMsgLen, XPVOID lParam); bool XEngine_Proxy_Recvmsg(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int nMsgLen); \ No newline at end of file diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.cpp index c86ce7d16dc1dc42ab4fb165a237e4f124c0299e..785b7837409ace2d93e4882d6c04e4f9dd0d7102 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.cpp @@ -334,7 +334,7 @@ int main(int argc, char** argv) XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动Proxy网络服务器失败,错误:%lX"), NetCore_GetLastError()); goto XENGINE_SERVICEAPP_EXIT; } - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动Proxy网络服务器成功,Proxy端口:%d,目标地址:%s,IO:%d"), st_ServiceConfig.nProxyPort, st_ServiceConfig.st_XProxy.tszIPAddr, st_ServiceConfig.st_XMax.nIOThread); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动Proxy网络服务器成功,Proxy端口:%d,默认地址:%s 配置个数:%d,IO:%d"), st_ServiceConfig.nProxyPort, st_ServiceConfig.st_XProxy.tszDefaultAddr, st_ServiceConfig.st_XProxy.pStl_ListRuleAddr->size(), st_ServiceConfig.st_XMax.nIOThread); NetCore_TCPXCore_RegisterCallBackEx(xhProxySocket, Network_Callback_ProxyLogin, Network_Callback_ProxyRecv, Network_Callback_ProxyLeave); XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,注册Proxy网络事件成功")); //客户端 @@ -353,10 +353,9 @@ int main(int argc, char** argv) //发送信息报告 if (st_ServiceConfig.st_XReport.bEnable && !bIsTest) { - if (InfoReport_APIMachine_Send(st_ServiceConfig.st_XReport.tszAPIUrl, st_ServiceConfig.st_XReport.tszServiceName)) + __int64x nTimeNumber = 0; + if (InfoReport_APIMachine_Send(st_ServiceConfig.st_XReport.tszAPIUrl, st_ServiceConfig.st_XReport.tszServiceName, &nTimeNumber)) { - __int64x nTimeNumber = 0; - InfoReport_APIMachine_GetTime(st_ServiceConfig.st_XReport.tszAPIUrl, st_ServiceConfig.st_XReport.tszServiceName, &nTimeNumber); XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动信息报告给API服务器:%s 成功,报告次数:%lld"), st_ServiceConfig.st_XReport.tszAPIUrl, nTimeNumber); } else diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.vcxproj b/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.vcxproj index 2c162ebe74ab522208ee600170069808bb51944c..a0e1363212ebfd5042f406c2143a18abe347a5e7 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.vcxproj +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -45,6 +53,12 @@ v143 Unicode + + Application + true + v143 + Unicode + Application false @@ -52,6 +66,13 @@ true Unicode + + Application + false + v143 + true + Unicode + @@ -66,9 +87,15 @@ + + + + + + true @@ -85,11 +112,21 @@ $(XEngine_Include);$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + true + $(XEngine_Include);$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + false $(XEngine_Include);$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + false + $(XEngine_Include);$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + Level3 @@ -140,6 +177,20 @@ true + + + Level3 + true + _DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + stdcpp20 + stdc17 + + + Console + true + + Level3 @@ -161,6 +212,27 @@ true + + + Level3 + true + true + true + NDEBUG;_CONSOLE;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + MultiThreaded + 4819 + stdcpp20 + stdc17 + /utf-8 %(AdditionalOptions) + + + Console + true + true + true + + diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_SocksTask.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_SocksTask.cpp index 63c3d75f32ea638dd405a0db3f612c21d89d1a4a..f857802d8e6058ad9359b77759434cfe430048fc 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_SocksTask.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_SocksTask.cpp @@ -19,6 +19,7 @@ bool XEngine_SocksTask_Handle(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int ENUM_PROXY_SESSION_SOCKS_STATUS enSocksStatus; if (!ModuleSession_Socks_GetStatus(lpszClientAddr, &enSocksStatus)) { + SocketOpt_HeartBeat_ForceOutAddrEx(xhSocksHeart, lpszClientAddr); XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("SOCKS客户端:%s,获取状态失败,错误:%lX"), lpszClientAddr, ProxyProtocol_GetLastError()); return false; } diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_TunnelTask.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_TunnelTask.cpp index f17fc4a99cf6bf479e07bc9b856490bf18829023..bd48d70b625015c0ebe41d8c466692bd8d4cefac 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_TunnelTask.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_TunnelTask.cpp @@ -31,12 +31,14 @@ bool XEngine_TunnelTask_Handle(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, in memset(tszMsgBuffer, '\0', MAX_PATH); if (!ModuleSession_Tunnel_Packet(lpszClientAddr, lpszMsgBuffer, nMsgLen, tszMsgBuffer, &nLen)) { + ProxyProtocol_TunnelCore_Packet(tszMsgBuffer, &nLen, ERROR_XENGINE_PROXY_PROTOCOL_FORMAT); + XEngine_Network_Send(lpszClientAddr, tszMsgBuffer, nLen, XENGINE_CLIENT_NETTYPE_TUNNEL); XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_WARN, _X("Tunnel客户端:%s,解析协议不成功,可能因为数据不完整,需要等待完整包,错误码:%lX"), lpszClientAddr, ProxyProtocol_GetLastError()); return false; } if (!ProxyProtocol_TunnelCore_Parse(tszMsgBuffer, nLen, tszIPAddr, &nIPPort, tszAuthInfo, &bProxy)) { - ProxyProtocol_TunnelCore_Packet(tszMsgBuffer, &nLen, 400); + ProxyProtocol_TunnelCore_Packet(tszMsgBuffer, &nLen, ERROR_XENGINE_PROXY_PROTOCOL_SERVER); XEngine_Network_Send(lpszClientAddr, tszMsgBuffer, nLen, XENGINE_CLIENT_NETTYPE_TUNNEL); XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("Tunnel客户端:%s,解析协议失败,错误:%lX"), lpszClientAddr, ProxyProtocol_GetLastError()); return false; @@ -71,7 +73,7 @@ bool XEngine_TunnelTask_Handle(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, in if (!XSocket_Api_DomainToAddr(tszIPAddr, &ppszListAddr, &nListCount)) { - ProxyProtocol_TunnelCore_Packet(tszMsgBuffer, &nLen, 500); + ProxyProtocol_TunnelCore_Packet(tszMsgBuffer, &nLen, ERROR_XENGINE_PROXY_PROTOCOL_DOMAIN); XEngine_Network_Send(lpszClientAddr, tszMsgBuffer, nLen, XENGINE_CLIENT_NETTYPE_TUNNEL); XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("Tunnel客户端:%s,解析域名:%s,失败,错误:%lX"), lpszClientAddr, tszIPAddr, ProxyProtocol_GetLastError()); return false; @@ -81,7 +83,7 @@ bool XEngine_TunnelTask_Handle(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, in } if (!XClient_TCPSelect_InsertEx(xhTunnelClient, &st_ProxyClient.xhClient, tszConnectAddr, nIPPort)) { - ProxyProtocol_TunnelCore_Packet(tszMsgBuffer, &nLen, 500); + ProxyProtocol_TunnelCore_Packet(tszMsgBuffer, &nLen, ERROR_XENGINE_PROXY_PROTOCOL_SERVER); XEngine_Network_Send(lpszClientAddr, tszMsgBuffer, nLen, XENGINE_CLIENT_NETTYPE_TUNNEL); XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("Tunnel客户端:%s,创建客户端连接失败,连接到服务器:%s:%d,错误:%lX"), lpszClientAddr, tszConnectAddr, nIPPort, ProxyProtocol_GetLastError()); return false; diff --git a/XEngine_Source/XEngine_UserProtocol.h b/XEngine_Source/XEngine_UserProtocol.h index 6d0c5113bed481d652d816acd2e4450c116bab79..2ba6a0b5332e8f26cbc92b8d2a43e67b4e59e7b9 100644 --- a/XEngine_Source/XEngine_UserProtocol.h +++ b/XEngine_Source/XEngine_UserProtocol.h @@ -29,6 +29,15 @@ typedef enum en_XEngine_XUser_Protocol /////////////////////////////////////////////////////////////////////////// // 导出的数据结构 /////////////////////////////////////////////////////////////////////////// +#define ERROR_XENGINE_PROXY_PROTOCOL_FORMAT 0x01 //协议格式内容错误 +#define ERROR_XENGINE_PROXY_PROTOCOL_SERVER 0x02 //服务器内部处理错误 +#define ERROR_XENGINE_PROXY_PROTOCOL_DOMAIN 0x03 //域名转IP错误 +#define ERROR_XENGINE_PROXY_PROTOCOL_NOTLOGIN 0x04 //未登录 +#define ERROR_XENGINE_PROXY_PROTOCOL_NOTFOUND 0x05 //未找到 +#define ERROR_XENGINE_PROXY_PROTOCOL_NOTSUPPORT 0x06 //不支持 +/////////////////////////////////////////////////////////////////////////// +// 导出的数据结构 +/////////////////////////////////////////////////////////////////////////// #pragma pack(push) #pragma pack(1)