diff --git a/.gitee/ISSUE_TEMPLATE.zh-CN.md b/.gitee/ISSUE_TEMPLATE.zh-CN.md
deleted file mode 100644
index f09d98dde9597de75ffcdb237c2b580b8fffa3f9..0000000000000000000000000000000000000000
--- a/.gitee/ISSUE_TEMPLATE.zh-CN.md
+++ /dev/null
@@ -1,13 +0,0 @@
-### 该问题是怎么引起的?
-
-
-
-### 重现步骤
-
-
-
-### 报错信息
-
-
-
-
diff --git a/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md b/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md
deleted file mode 100644
index 66d4332058d27e3c8ef94919138576d71b524467..0000000000000000000000000000000000000000
--- a/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md
+++ /dev/null
@@ -1,14 +0,0 @@
-### 相关的Issue
-
-
-### 原因(目的、解决的问题等)
-
-
-### 描述(做了什么,变更了什么)
-
-
-### 测试用例(新增、改动、可能影响的功能)
-
-
-
-
diff --git a/CHANGELOG b/CHANGELOG
new file mode 100644
index 0000000000000000000000000000000000000000..f33c9ff86f0f849ca22978617db43629a8651111
--- /dev/null
+++ b/CHANGELOG
@@ -0,0 +1,45 @@
+XEngine_ProxyServer V1.2.0.1001
+
+添加:jsoncpp模块到项目
+修改:VS2019到VS2022
+
+added:jsoncpp module
+modify:up vs2019 to vs2022
+======================================================================================
+XEngine_ProxyServer V1.1.0.1001
+
+添加:用户验证模块
+添加:SOCKS和TUNNEL支持用户基本验证
+添加:日志文件路径设置
+添加:验证文件列表
+修改:配置文件socks修改为验证
+优化:当发送消息给客户端的时候可以超时了
+修复:没有子域名,域名无法解析的问题
+修复:LINUX构建错误
+修复:vscopy文件拷贝问题
+删除:多余的协议定义
+
+added:user authorize module
+added:socks and tunnel user authorize
+added:log set file address
+added:version list information
+modify:configure modify socks to auth
+improved:can be timeout when send message to client
+fixed:no have subdomain,The domain name cannot be resolved
+fixed:build error on linux
+fixed:vscopy file
+delete:Redundant protocol definitions
+======================================================================================
+XEngine_ProxyServer V1.0.0.1001
+
+支持:HTTP隧道匿名代理
+支持:SOCKS5隧道匿名代理
+支持:配置模块
+支持:心跳超时
+支持:日志管理
+
+Support: HTTP tunnel anonymous proxy
+Support: SOCKS5 tunnel anonymous proxy
+Support: configuration module
+Support: Heartbeat timeout
+Support: log management
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000000000000000000000000000000000000..5e25399e4fc128083b52a8d94e5cce2092a2808b
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,16 @@
+author by:qyt 486179@qq.com
+
+## 贡献准则(Contribution Guidelines)
+
+此服务是一个尝试由社区驱动,你的共享价值将不可估量!
+the service is an attempt to be driven by the community, your shared value will be immeasurable!
+
+## 提交代码(Submit code)
+
+想要贡献代码,你需要按照我们的风格来提交代码.
+To contribute code, you need to submit code in our style
+
+## 法律声明(Legal Notice)
+
+如果你的提交的请求有依赖其他库,请注意库的版权.你的提交代码将被允许被我们随意复制,分发,删除,修改
+If your submitted request depends on other libraries, please pay attention to the copyright of the library. Your submitted code will be allowed to be copied, distributed, deleted, and modified by us at will
\ No newline at end of file
diff --git a/COPYRIGHT b/COPYRIGHT
new file mode 100644
index 0000000000000000000000000000000000000000..0ef93911191c79e9cc5e8001f24ed0481a785ada
--- /dev/null
+++ b/COPYRIGHT
@@ -0,0 +1,3 @@
+ the open source software depend on the following libraries, please note the copyright
+XEngine:https://gitee.com/xyry/libxengine or https://github.com/libxengine/xengine
+jsoncpp:https://github.com/open-source-parsers/jsoncpp
\ No newline at end of file
diff --git a/README.en.md b/README.en.md
index 8b1a79528892a9601e059de390ee15df226d44f4..c64a46a8283759cd4da8d56a408b0351640fbf98 100644
--- a/README.en.md
+++ b/README.en.md
@@ -24,29 +24,15 @@ this software support following features
#### Requirements
support system above windows 7sp1 and linux(ubuntu20.04,centos8)
XEngine need V7.27 or above
-vcpkg need 2021.05.11 or above
#### Windows
-use vs2019 x86(debug or release) x64(only release) open and complie
-You need to configure the environment in the following way, otherwise you may need to set the library directory in the project yourself
-
-##### install Dependent library
-vcpkg:https://github.com/microsoft/vcpkg
-vcpkg.exe install jsoncpp
-vcpkg integrate install
-you can not use vcpkg and config jsoncpp development for youself
+use vs open and complie
+You need to configure the environment in the following way, otherwise you may need to set the library directory in the project yourself
#### Linux
Linux use Makefile to complie
supproted ubuntu x64 or centos x64
-##### install Dependent library
-install jsoncpp to your system
-ubuntu20.04
-sudo apt install libjsoncpp-devel
-Centos8.x
-sudo dnf install jsoncpp-devel
-
##### XEngine Install
you can install xengine env to your system by shell
like this:sudo XEngine_RunEnv.sh -i 3
diff --git a/README.md b/README.md
index 4e4545816111e20322fba136ef94335f6af0ad64..43b59647a299abe2c39c1cb6ff914cf46389209d 100644
--- a/README.md
+++ b/README.md
@@ -24,28 +24,15 @@ c c++ Socks5 Proxy Service HTTP Tunnel Proxy Service
#### 版本需求
支持WINDOWS 7SP1和LINUX(UBUNT20.04,CENTOS8)以上系统
XEngine版本需要V7.27或者以上版本
-vcpkg 需要2021.05.11以上版本
#### Windows
-使用VS2019 x86(debug release) x64(release)打开并且编译
+使用VS打开并且编译
你需要按照下面的方式配置环境,不然你可能需要自己在项目中设置库目录
-##### 三方库环境
-需要使用VCPKG安装环境.代码地址:https://github.com/microsoft/vcpkg
-安装好后你可能需要把它集成到你的VS中
-然后命令安装环境: vcpkg.exe install jsoncpp
-集成VS环境: vcpkg integrate install
-vcpkg 主要为了方便安装jsoncpp,如果你想自己配置jsoncpp的环境,可以不使用vcpkg...
#### Linux
Linux使用Makefile编译
UBUNTU20.04 x64或者CENTOS8 x64均可
-##### 三方库环境
-基于不同系统,可能命令不同,比如在Ubuntu下面
-sudo apt install libjsoncpp-devel
-Centos8.x
-sudo dnf install jsoncpp-devel
-
##### 编译命令
在XEngine_Source目录下执行命令
make 编译
diff --git a/XEngine_Docment/Docment_en.docx b/XEngine_Docment/Docment_en.docx
index 9057e20ccdf617387f5c849e8b2fc4840a8d9910..73eb262507cd78e430a18a6a9ee1b7d9cc1c7ede 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 172dc1ac01f57ed89026119852df0b9b3bcdb905..7063c3426e39862632e781ae0561089812364089 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 ac11f937de68f236490faf8e7f5b3ea80e1a30f5..82e93497c65347779edde0571b7b314bc3db8b2d 100644
--- a/XEngine_Release/XEngine_Config/XEngine_Config.json
+++ b/XEngine_Release/XEngine_Config/XEngine_Config.json
@@ -20,10 +20,11 @@
"tszLogFile":"./XEngine_Log/XEngine_ServiceApp.log"
},
"XAuth":{
- "bAuth":0,
+ "bAuth":2,
"tszAuthFile":"./XEngine_Config/UserList.txt"
},
"XVer":[
+ "1.2.0.1001 Build20220413",
"1.1.0.1001 Build20211231",
"1.0.0.1001 Build20211211"
]
diff --git a/XEngine_Source/Makefile b/XEngine_Source/Makefile
index 310220a5e9eec2e1d900b7cf6f61bf92b482b55b..b666bf30561850a707d0d49dc2f0a1538fc2f0a7 100644
--- a/XEngine_Source/Makefile
+++ b/XEngine_Source/Makefile
@@ -3,15 +3,20 @@ UNICODE = 0
#编译的选项参数
FLAGS = RELEASE=$(RELEASE)
#要编译的模块
+THIRDPART_MODULE_JSONCPP = ./XEngine_ThirdPart/jsoncpp
+
MODULE_CONFIGURE_PATH = ./XEngine_ModuleConfigure
MODULE_AUTHORIZE_PATH = ./XEngine_ModuleAuthorize
APP_SERVICE_PATH = ./XEngine_ServiceApp
-XENGINE_MODULES = libXEngine_ModuleConfigure.so libXEngine_ModuleAuthorize.so XEngine_ServiceApp.exe
+XENGINE_MODULES = libjsoncpp.so libXEngine_ModuleConfigure.so libXEngine_ModuleAuthorize.so XEngine_ServiceApp.exe
.PHONY:MakeAll
MakeAll:$(XENGINE_MODULES)
+libjsoncpp.so:
+ make -C $(THIRDPART_MODULE_JSONCPP) $(FLAGS)
+
libXEngine_ModuleConfigure.so:
make -C $(MODULE_CONFIGURE_PATH) $(FLAGS)
libXEngine_ModuleAuthorize.so:
diff --git a/XEngine_Source/VSCopy-x64.bat b/XEngine_Source/VSCopy-x64.bat
new file mode 100644
index 0000000000000000000000000000000000000000..8f3c7d76894c457b19897dd1fce4fd37348ab830
--- /dev/null
+++ b/XEngine_Source/VSCopy-x64.bat
@@ -0,0 +1,24 @@
+copy /y "%XEngine_Lib64%\x64\XEngine_BaseLib\XEngine_BaseLib.dll" "./"
+copy /y "%XEngine_Lib64%\x64\XEngine_BaseLib\XEngine_Algorithm.dll" "./"
+copy /y "%XEngine_Lib64%\x64\XEngine_Core\XEngine_Core.dll" "./"
+copy /y "%XEngine_Lib64%\x64\XEngine_Core\XEngine_OPenSsl.dll" "./"
+copy /y "%XEngine_Lib64%\x64\XEngine_Core\XEngine_ManagePool.dll" "./"
+copy /y "%XEngine_Lib64%\x64\XEngine_Core\XEngine_NetXApi.dll" "./"
+
+copy /y "%XEngine_Lib64%\x64\XEngine_NetHelp\NetHelp_APIHelp.dll" "./"
+copy /y "%XEngine_Lib64%\x64\XEngine_Client\XClient_Socket.dll" "./"
+
+copy /y "%XEngine_Lib64%\x64\XEngine_HelpComponents\HelpComponents_XLog.dll" "./"
+copy /y "%XEngine_Lib64%\x64\XEngine_RfcComponents\RfcComponents_ProxyProtocol.dll" "./"
+
+copy /y "%XEngine_Lib64%\x64\XEngine_SystemSdk\XEngine_ProcFile.dll" "./"
+copy /y "%XEngine_Lib64%\x64\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
+
+copy /y "%XEngine_Lib64%\x64\XEngine_SystemSdk\XEngine_ProcFile.dll" "./"
+copy /y "%XEngine_Lib64%\x64\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
+
+copy /y "%XEngine_Lib64%\x64\XEngine_LibEx\libcrypto-3-x64.dll" "./"
+copy /y "%XEngine_Lib64%\x64\XEngine_LibEx\libssl-3-x64.dll" "./"
+copy /y "%XEngine_Lib64%\x64\XEngine_LibEx\libcurl.dll" "./"
+copy /y "%XEngine_Lib64%\XEngine_LibEx\nghttp2.dll" "./"
+copy /y "%XEngine_Lib64%\x64\XEngine_HelpComponents\zlib1.dll" "./"
\ No newline at end of file
diff --git a/XEngine_Source/VSCopy-x86.bat b/XEngine_Source/VSCopy-x86.bat
index 2465b0d306900fea097373c03fa2aaaed7c0d5d9..94062095f66c801587c87f89c4c05e96f7aa9b6f 100644
--- a/XEngine_Source/VSCopy-x86.bat
+++ b/XEngine_Source/VSCopy-x86.bat
@@ -1,23 +1,23 @@
-copy /y "%XEngine_Library%\x86\XEngine_BaseLib\XEngine_BaseLib.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_BaseLib\XEngine_Algorithm.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_Core\XEngine_Core.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_Core\XEngine_OPenSsl.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_Core\XEngine_ManagePool.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_Core\XEngine_NetXApi.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_BaseLib.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_OPenSsl.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_ManagePool.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_NetXApi.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_NetHelp\NetHelp_APIHelp.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_Client\XClient_Socket.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_Client\XClient_Socket.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_HelpComponents\HelpComponents_XLog.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_RfcComponents\RfcComponents_ProxyProtocol.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_HelpComponents\HelpComponents_XLog.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_RfcComponents\RfcComponents_ProxyProtocol.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_SystemSdk\XEngine_ProcFile.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_ProcFile.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_SystemSdk\XEngine_ProcFile.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_ProcFile.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_LibEx\libcrypto-1_1.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_LibEx\libssl-1_1.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_LibEx\libcurl.dll" "./"
-copy /y "%XEngine_Library%\x86\XEngine_HelpComponents\zlib1.dll" "./"
\ No newline at end of file
+copy /y "%XEngine_Lib32%\XEngine_LibEx\libcrypto-3.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_LibEx\libssl-3.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_LibEx\libcurl.dll" "./"
+copy /y "%XEngine_Lib32%\XEngine_HelpComponents\zlib1.dll" "./"
\ No newline at end of file
diff --git a/XEngine_Source/XEngine.sln b/XEngine_Source/XEngine.sln
index fce9a93262f81059ac4a2f44061294057179169b..6fc27e952629e6ae446f322b0fc75b53eaf82aaf 100644
--- a/XEngine_Source/XEngine.sln
+++ b/XEngine_Source/XEngine.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.31911.196
+# Visual Studio Version 17
+VisualStudioVersion = 17.1.32328.378
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XEngine_ServiceApp", "XEngine_ServiceApp\XEngine_ServiceApp.vcxproj", "{B94018F9-541B-4BE4-A2A8-AD49DD35357B}"
EndProject
@@ -14,6 +14,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "XEngine_UserHdr", "XEngine_
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XEngine_ModuleAuthorize", "XEngine_ModuleAuthorize\XEngine_ModuleAuthorize.vcxproj", "{58026DC2-5383-490C-9BB4-BF3152192F0C}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "XEngine_ThirdPart", "XEngine_ThirdPart", "{F18FFEA0-27D2-4590-9190-F69F5E3D21D2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jsoncpp", "XEngine_ThirdPart\jsoncpp\jsoncpp.vcxproj", "{F1736B3F-03A2-4FC7-B045-A12BA8D724FB}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@@ -46,10 +50,21 @@ Global
{58026DC2-5383-490C-9BB4-BF3152192F0C}.Release|x64.Build.0 = Release|x64
{58026DC2-5383-490C-9BB4-BF3152192F0C}.Release|x86.ActiveCfg = Release|Win32
{58026DC2-5383-490C-9BB4-BF3152192F0C}.Release|x86.Build.0 = Release|Win32
+ {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|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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {F1736B3F-03A2-4FC7-B045-A12BA8D724FB} = {F18FFEA0-27D2-4590-9190-F69F5E3D21D2}
+ EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9B202F91-A601-429E-BB0F-880DDEE096FE}
EndGlobalSection
diff --git a/XEngine_Source/XEngine_ModuleAuthorize/Makefile b/XEngine_Source/XEngine_ModuleAuthorize/Makefile
index a00f37f1c25ffa69fd4f382fca14f96302e265b7..90efaf86cf68f84394063851e17966f73365ee7e 100644
--- a/XEngine_Source/XEngine_ModuleAuthorize/Makefile
+++ b/XEngine_Source/XEngine_ModuleAuthorize/Makefile
@@ -3,7 +3,7 @@ RELEASE = 0
UNICODE = 0
INCLUDE = -I ./
LOADBIN =
-LIB = -ljsoncpp
+LIB =
LIBEX = -static-libgcc -lrt -ldl -lpthread
LOADSO = -Wl,-rpath=
LIBINCLUDE = ModuleAuthorize_User.o pch.o
diff --git a/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuth_Define.h b/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuth_Define.h
index 156fa80aee4624108f318b0fdee5319b283408f9..026d5d02b926b1fc23dfa8f3597705924362c5c3 100644
--- a/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuth_Define.h
+++ b/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuth_Define.h
@@ -1,61 +1,61 @@
-#pragma once
+#pragma once
/********************************************************************
// Created: 2021/12/29 10:30:04
// File Name: D:\XEngine_ProxyServer\XEngine_Source\XEngine_ModuleAuthorize\ModuleAuth_Define.h
// File Path: D:\XEngine_ProxyServer\XEngine_Source\XEngine_ModuleAuthorize
// File Base: ModuleAuth_Define
// File Ext: h
-// Project: XEngine(ͨ)
+// Project: XEngine(网络通信引擎)
// Author: qyt
-// Purpose:
+// Purpose: 导出定义
// History:
*********************************************************************/
//////////////////////////////////////////////////////////////////////////
-//
+// 导出函数
//////////////////////////////////////////////////////////////////////////
extern "C" DWORD ModuleAuthorize_GetLastError(int* pInt_SysError = NULL);
/************************************************************************/
-/* ֤ */
+/* 验证导出函数 */
/************************************************************************/
/********************************************************************
-ƣModuleAuthorize_User_Init
-ܣʼȨỰ
- .һlpszAuthFile
- In/OutIn
- ַָͣ
- ɿգN
- ˼Ȩļַ
-ֵ
- ͣ
- ˼Ƿɹ
-ע
+函数名称:ModuleAuthorize_User_Init
+函数功能:初始化授权会话管理器
+ 参数.一:lpszAuthFile
+ In/Out:In
+ 类型:常量字符指针
+ 可空:N
+ 意思:输入授权文件地址
+返回值
+ 类型:逻辑型
+ 意思:是否成功
+备注:
*********************************************************************/
extern "C" BOOL ModuleAuthorize_User_Init(LPCTSTR lpszAuthFile);
/************************************************************************
-ƣModuleAuthorize_User_Destory
-ܣȨ
-ֵ
- ͣ
- ˼Ƿٳɹ
-ע
+函数名称:ModuleAuthorize_User_Destory
+函数功能:销毁授权管理器
+返回值
+ 类型:逻辑型
+ 意思:是否销毁成功
+备注:
************************************************************************/
extern "C" BOOL ModuleAuthorize_User_Destory();
/********************************************************************
-ƣModuleAuthorize_User_Exist
-ܣǷ֤ͨ
- .һlpszUser
- In/OutIn
- ַָͣ
- ɿգN
- ˼û
- .lpszPass
- In/OutIn
- ַָͣ
- ɿգN
- ˼
-ֵ
- ͣ
- ˼Ƿɹ
-ע
+函数名称:ModuleAuthorize_User_Exist
+函数功能:是否验证通过
+ 参数.一:lpszUser
+ In/Out:In
+ 类型:常量字符指针
+ 可空:N
+ 意思:输入用户名
+ 参数.二:lpszPass
+ In/Out:In
+ 类型:常量字符指针
+ 可空:N
+ 意思:输入密码
+返回值
+ 类型:逻辑型
+ 意思:是否成功
+备注:
*********************************************************************/
extern "C" BOOL ModuleAuthorize_User_Exist(LPCTSTR lpszUser, LPCTSTR lpszPass);
\ No newline at end of file
diff --git a/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuth_Error.h b/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuth_Error.h
index dbcf052875e3e56be05c1c7decb024fd643bed9a..ae4012756fe600f4bfc012d8185d24aaf3799fbe 100644
--- a/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuth_Error.h
+++ b/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuth_Error.h
@@ -1,16 +1,16 @@
-#pragma once
+#pragma once
/********************************************************************
// Created: 2021/12/29 10:29:54
// File Name: D:\XEngine_ProxyServer\XEngine_Source\XEngine_ModuleAuthorize\ModuleAuth_Error.h
// File Path: D:\XEngine_ProxyServer\XEngine_Source\XEngine_ModuleAuthorize
// File Base: ModuleAuth_Error
// File Ext: h
-// Project: XEngine(ͨ)
+// Project: XEngine(网络通信引擎)
// Author: qyt
-// Purpose:
+// Purpose: 导出错误
// History:
*********************************************************************/
-#define ERROR_MODULE_AUTHORIZE_USER_PARAMENT 0xA0001 //
-#define ERROR_MODULE_AUTHORIZE_USER_OPENFILE 0xA0002 //ļʧ
-#define ERROR_MODULE_AUTHORIZE_USER_NOTFOUND 0xA0003 //ûҵ
-#define ERROR_MODULE_AUTHORIZE_USER_PASSWORD 0xA0004 //
\ No newline at end of file
+#define ERROR_MODULE_AUTHORIZE_USER_PARAMENT 0xA0001 //参数错误
+#define ERROR_MODULE_AUTHORIZE_USER_OPENFILE 0xA0002 //打开文件失败
+#define ERROR_MODULE_AUTHORIZE_USER_NOTFOUND 0xA0003 //没有找到
+#define ERROR_MODULE_AUTHORIZE_USER_PASSWORD 0xA0004 //密码错误
\ No newline at end of file
diff --git a/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuthorize_User/ModuleAuthorize_User.cpp b/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuthorize_User/ModuleAuthorize_User.cpp
index a562eea4cb25d9c9dcb65440bb4a83ff8c33f0a1..6fea7b2aaa93c5239ceab99ad63c600bc6379a16 100644
--- a/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuthorize_User/ModuleAuthorize_User.cpp
+++ b/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuthorize_User/ModuleAuthorize_User.cpp
@@ -1,4 +1,4 @@
-#include "pch.h"
+#include "pch.h"
#include "ModuleAuthorize_User.h"
/********************************************************************
// Created: 2021/12/29 10:24:25
@@ -6,9 +6,9 @@
// File Path: D:\XEngine_ProxyServer\XEngine_Source\XEngine_ModuleAuthorize\ModuleAuthorize_User
// File Base: ModuleAuthorize_User
// File Ext: cpp
-// Project: XEngine(ͨ)
+// Project: XEngine(网络通信引擎)
// Author: qyt
-// Purpose: û֤
+// Purpose: 用户验证
// History:
*********************************************************************/
CModuleAuthorize_User::CModuleAuthorize_User()
@@ -20,20 +20,20 @@ CModuleAuthorize_User::~CModuleAuthorize_User()
}
//////////////////////////////////////////////////////////////////////////
-// ú
+// 公用函数
//////////////////////////////////////////////////////////////////////////
/********************************************************************
-ƣModuleAuthorize_User_Init
-ܣʼȨỰ
- .һlpszAuthFile
- In/OutIn
- ַָͣ
- ɿգN
- ˼Ȩļַ
-ֵ
- ͣ
- ˼Ƿɹ
-ע
+函数名称:ModuleAuthorize_User_Init
+函数功能:初始化授权会话管理器
+ 参数.一:lpszAuthFile
+ In/Out:In
+ 类型:常量字符指针
+ 可空:N
+ 意思:输入授权文件地址
+返回值
+ 类型:逻辑型
+ 意思:是否成功
+备注:
*********************************************************************/
BOOL CModuleAuthorize_User::ModuleAuthorize_User_Init(LPCTSTR lpszAuthFile)
{
@@ -80,12 +80,12 @@ BOOL CModuleAuthorize_User::ModuleAuthorize_User_Init(LPCTSTR lpszAuthFile)
return TRUE;
}
/************************************************************************
-ƣModuleAuthorize_User_Destory
-ܣȨ
-ֵ
- ͣ
- ˼Ƿٳɹ
-ע
+函数名称:ModuleAuthorize_User_Destory
+函数功能:销毁授权管理器
+返回值
+ 类型:逻辑型
+ 意思:是否销毁成功
+备注:
************************************************************************/
BOOL CModuleAuthorize_User::ModuleAuthorize_User_Destory()
{
@@ -95,22 +95,22 @@ BOOL CModuleAuthorize_User::ModuleAuthorize_User_Destory()
return TRUE;
}
/********************************************************************
-ƣModuleAuthorize_User_Exist
-ܣǷ֤ͨ
- .һlpszUser
- In/OutIn
- ַָͣ
- ɿգN
- ˼û
- .lpszPass
- In/OutIn
- ַָͣ
- ɿգN
- ˼
-ֵ
- ͣ
- ˼Ƿɹ
-ע
+函数名称:ModuleAuthorize_User_Exist
+函数功能:是否验证通过
+ 参数.一:lpszUser
+ In/Out:In
+ 类型:常量字符指针
+ 可空:N
+ 意思:输入用户名
+ 参数.二:lpszPass
+ In/Out:In
+ 类型:常量字符指针
+ 可空:N
+ 意思:输入密码
+返回值
+ 类型:逻辑型
+ 意思:是否成功
+备注:
*********************************************************************/
BOOL CModuleAuthorize_User::ModuleAuthorize_User_Exist(LPCTSTR lpszUser, LPCTSTR lpszPass)
{
diff --git a/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuthorize_User/ModuleAuthorize_User.h b/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuthorize_User/ModuleAuthorize_User.h
index 50b4e56b11e71d9dbf92dd74469e8c3f14e15e0c..b1c455f221b49f9ec83de129287478a1a7d8f5c9 100644
--- a/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuthorize_User/ModuleAuthorize_User.h
+++ b/XEngine_Source/XEngine_ModuleAuthorize/ModuleAuthorize_User/ModuleAuthorize_User.h
@@ -1,13 +1,13 @@
-#pragma once
+#pragma once
/********************************************************************
// Created: 2021/12/29 10:23:14
// File Name: D:\XEngine_ProxyServer\XEngine_Source\XEngine_ModuleAuthorize\ModuleAuthorize_User\ModuleAuthorize_User.h
// File Path: D:\XEngine_ProxyServer\XEngine_Source\XEngine_ModuleAuthorize\ModuleAuthorize_User
// File Base: ModuleAuthorize_User
// File Ext: h
-// Project: XEngine(ͨ)
+// Project: XEngine(网络通信引擎)
// Author: qyt
-// Purpose: û֤
+// Purpose: 用户验证
// History:
*********************************************************************/
diff --git a/XEngine_Source/XEngine_ModuleAuthorize/XEngine_ModuleAuthorize.vcxproj b/XEngine_Source/XEngine_ModuleAuthorize/XEngine_ModuleAuthorize.vcxproj
index 53b7b33faa6129d2c9e20cb5642e2831769a0c60..cc3f4410d24d5e7e26bcb3587fb785a9f605c4b8 100644
--- a/XEngine_Source/XEngine_ModuleAuthorize/XEngine_ModuleAuthorize.vcxproj
+++ b/XEngine_Source/XEngine_ModuleAuthorize/XEngine_ModuleAuthorize.vcxproj
@@ -29,26 +29,26 @@
DynamicLibrary
true
- v142
+ v143
MultiByte
DynamicLibrary
false
- v142
+ v143
true
MultiByte
DynamicLibrary
true
- v142
- Unicode
+ v143
+ MultiByte
DynamicLibrary
false
- v142
+ v143
true
MultiByte
@@ -82,6 +82,8 @@
true
+ $(XEngine_Include);$(IncludePath)
+ $(XEngine_Lib64);$(LibraryPath)
false
@@ -128,7 +130,7 @@
Level3
true
- _DEBUG;XENGINEMODULEAUTHORIZE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ _DEBUG;XENGINEMODULEAUTHORIZE_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
Use
pch.h
diff --git a/XEngine_Source/XEngine_ModuleConfigure/Makefile b/XEngine_Source/XEngine_ModuleConfigure/Makefile
index 1a44416319f3f780ca5792cae2407ce5c9ac6d44..7bca8c178490640166f26598b9cf35db8cb561e2 100644
--- a/XEngine_Source/XEngine_ModuleConfigure/Makefile
+++ b/XEngine_Source/XEngine_ModuleConfigure/Makefile
@@ -1,11 +1,11 @@
CC = g++ -Wall -std=c++17 -fPIC
RELEASE = 0
UNICODE = 0
-INCLUDE = -I ./
-LOADBIN =
+INCLUDE = -I ./ -I ../XEngine_ThirdPart/jsoncpp
+LOADBIN = -L ../XEngine_ThirdPart/jsoncpp
LIB = -ljsoncpp
LIBEX = -static-libgcc -lrt -ldl -lpthread
-LOADSO = -Wl,-rpath=
+LOADSO = -Wl,-rpath=./,--disable-new-dtags
LIBINCLUDE = ModuleConfigure_Json.o pch.o
ifeq ($(RELEASE),1)
diff --git a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h
index f9f13b388b9d0d8fa4f81e165103eee80341f389..50750c4da846a2241cd5bebf11edb3e3c6c75d1e 100644
--- a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h
+++ b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h
@@ -1,47 +1,47 @@
-#pragma once
+#pragma once
/********************************************************************
// Created: 2021/12/02 16:09:03
// File Name: D:\XEngine_ServiceApp\XEngine_Source\XEngine_ModuleConfigure\ModuleConfig_Define.h
// File Path: D:\XEngine_ServiceApp\XEngine_Source\XEngine_ModuleConfigure
// File Base: ModuleConfig_Define
// File Ext: h
-// Project: XEngine(ͨ)
+// Project: XEngine(网络通信引擎)
// Author: qyt
-// Purpose: ģ鵼
+// Purpose: 配置模块导出定义
// History:
*********************************************************************/
//////////////////////////////////////////////////////////////////////////
-// ݽṹ
+// 导出的数据结构
//////////////////////////////////////////////////////////////////////////
typedef struct tag_XEngine_ServiceConfig
{
- TCHAR tszIPAddr[128]; //IPַ,Ҫ
- BOOL bDeamon; //Ƿػ,LINUXЧ
- int nSocksPort; //Socks˿,<=0
- int nTunnelPort; //Tunnel˿
+ TCHAR tszIPAddr[128]; //本机IP地址,根据需要配置
+ BOOL bDeamon; //是否以守护进程启动,LINUX有效
+ int nSocksPort; //Socks端口,<=0不启用
+ int nTunnelPort; //Tunnel服务端口
struct
{
- int nMaxClient; //ͻ˸
- int nMaxQueue; //и
- int nIOThread; //IO߳
+ int nMaxClient; //最大客户端个数
+ int nMaxQueue; //最大队列个数
+ int nIOThread; //网络IO线程数
}st_XMax;
struct
{
- int nTimeCheck; //
- int nSocksTimeOut; //TCPʱʱ
- int nTunnelTimeOut; //HTTPʱʱ
- }st_XTime; //*ʱ=ʱ
+ int nTimeCheck; //检测次数
+ int nSocksTimeOut; //TCP超时时间
+ int nTunnelTimeOut; //HTTP超时时间
+ }st_XTime; //次数*时间=超时
struct
{
- TCHAR tszLogFile[MAX_PATH]; //־·
- int nMaxSize; //־С
- int nMaxCount; //־
- int nLogLeave; //־ȼ
+ TCHAR tszLogFile[MAX_PATH]; //日志保存路径
+ int nMaxSize; //最大日志大小
+ int nMaxCount; //最大日志个数
+ int nLogLeave; //日志等级
}st_XLog;
struct
{
- int bAuth; //Ƿ֤,0
- TCHAR tszAuthFile[MAX_PATH]; //ַ֤
+ int bAuth; //是否启用验证,大于0启用
+ TCHAR tszAuthFile[MAX_PATH]; //验证地址
}st_XAuth;
struct
{
@@ -49,28 +49,28 @@ typedef struct tag_XEngine_ServiceConfig
}st_XVer;
}XENGINE_SERVICECONFIG;
//////////////////////////////////////////////////////////////////////////
-//
+// 导出函数定义
//////////////////////////////////////////////////////////////////////////
extern "C" DWORD ModuleConfigure_GetLastError(int* pInt_ErrorCode = NULL);
/************************************************************************/
-/* ļöȡ */
+/* 文件配置读取 */
/************************************************************************/
/********************************************************************
-ƣModuleConfigure_Json_File
-ܣȡJSONļ
- .һlpszConfigFile
- In/OutIn
- ַָͣ
- ɿգN
- ˼Ҫȡļ
- .pSt_ServerConfig
- In/OutOut
- ͣݽṹָ
- ɿգN
- ˼Ϣ
-ֵ
- ͣ
- ˼Ƿɹ
-ע
+函数名称:ModuleConfigure_Json_File
+函数功能:读取JSON配置文件
+ 参数.一:lpszConfigFile
+ In/Out:In
+ 类型:常量字符指针
+ 可空:N
+ 意思:输入要读取的配置文件
+ 参数.二:pSt_ServerConfig
+ In/Out:Out
+ 类型:数据结构指针
+ 可空:N
+ 意思:输出服务配置信息
+返回值
+ 类型:逻辑型
+ 意思:是否成功
+备注:
*********************************************************************/
extern "C" BOOL ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVICECONFIG* pSt_ServerConfig);
\ No newline at end of file
diff --git a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Error.h b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Error.h
index 00bf513bedcffea88b4090324cbd41910da6fcad..23a60fdb14b58b7c530b77ec2596f5c20ed36f11 100644
--- a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Error.h
+++ b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Error.h
@@ -1,20 +1,20 @@
-#pragma once
+#pragma once
/********************************************************************
// Created: 2021/12/02 16:15:47
// File Name: D:\XEngine_ServiceApp\XEngine_Source\XEngine_ModuleConfigure\ModuleConfig_Error.h
// File Path: D:\XEngine_ServiceApp\XEngine_Source\XEngine_ModuleConfigure
// File Base: ModuleConfig_Error
// File Ext: h
-// Project: XEngine(ͨ)
+// Project: XEngine(网络通信引擎)
// Author: qyt
-// Purpose: ģ鵼
+// Purpose: 配置模块导出错误
// History:
*********************************************************************/
-#define ERROR_MODULE_CONFIGURE_JSON_PARAMENT 0xA0001 //
-#define ERROR_MODULE_CONFIGURE_JSON_OPENFILE 0xA0002 //ļʧ
-#define ERROR_MODULE_CONFIGURE_JSON_PARSE 0xA0003 //JSONʧ
-#define ERROR_MODULE_CONFIGURE_JSON_XMAX 0xA0004 //ȡXMAXʧ
-#define ERROR_MODULE_CONFIGURE_JSON_XTIME 0xA0005 //ȡXTIMEʧ
-#define ERROR_MODULE_CONFIGURE_JSON_XLOG 0xA0006 //ȡXLOGʧ
-#define ERROR_MODULE_CONFIGURE_JSON_XAUTH 0xA0007 //û֤
-#define ERROR_MODULE_CONFIGURE_JSON_XVER 0xA0008 //ûа汾
\ No newline at end of file
+#define ERROR_MODULE_CONFIGURE_JSON_PARAMENT 0xA0001 //参数错误
+#define ERROR_MODULE_CONFIGURE_JSON_OPENFILE 0xA0002 //打开文件失败
+#define ERROR_MODULE_CONFIGURE_JSON_PARSE 0xA0003 //解析JSON失败
+#define ERROR_MODULE_CONFIGURE_JSON_XMAX 0xA0004 //读取XMAX配置失败
+#define ERROR_MODULE_CONFIGURE_JSON_XTIME 0xA0005 //读取XTIME配置失败
+#define ERROR_MODULE_CONFIGURE_JSON_XLOG 0xA0006 //读取XLOG配置失败
+#define ERROR_MODULE_CONFIGURE_JSON_XAUTH 0xA0007 //没有验证配置
+#define ERROR_MODULE_CONFIGURE_JSON_XVER 0xA0008 //没有版本配置
\ No newline at end of file
diff --git a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp
index 3735aa8ac8888217db651c10bbe6f5a67afebd91..d3c10db65b723b6783ba8849fd35076671badb97 100644
--- a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp
+++ b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp
@@ -1,4 +1,4 @@
-#include "pch.h"
+#include "pch.h"
#include "ModuleConfigure_Json.h"
/********************************************************************
// Created: 2021/12/02 16:14:11
@@ -6,9 +6,9 @@
// File Path: D:\XEngine_ServiceApp\XEngine_Source\XEngine_ModuleConfigure\ModuleConfigure_Json
// File Base: ModuleConfigure_Json
// File Ext: cpp
-// Project: XEngine(ͨ)
+// Project: XEngine(网络通信引擎)
// Author: qyt
-// Purpose: JSONöдʵ
+// Purpose: JSON配置读写实现
// History:
*********************************************************************/
CModuleConfigure_Json::CModuleConfigure_Json()
@@ -20,25 +20,25 @@ CModuleConfigure_Json::~CModuleConfigure_Json()
}
//////////////////////////////////////////////////////////////////////////
-// ú
+// 公用函数
//////////////////////////////////////////////////////////////////////////
/********************************************************************
-ƣModuleConfigure_Json_File
-ܣȡJSONļ
- .һlpszConfigFile
- In/OutIn
- ַָͣ
- ɿգN
- ˼Ҫȡļ
- .pSt_ServerConfig
- In/OutOut
- ͣݽṹָ
- ɿգN
- ˼Ϣ
-ֵ
- ͣ
- ˼Ƿɹ
-ע
+函数名称:ModuleConfigure_Json_File
+函数功能:读取JSON配置文件
+ 参数.一:lpszConfigFile
+ In/Out:In
+ 类型:常量字符指针
+ 可空:N
+ 意思:输入要读取的配置文件
+ 参数.二:pSt_ServerConfig
+ In/Out:Out
+ 类型:数据结构指针
+ 可空:N
+ 意思:输出服务配置信息
+返回值
+ 类型:逻辑型
+ 意思:是否成功
+备注:
*********************************************************************/
BOOL CModuleConfigure_Json::ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVICECONFIG* pSt_ServerConfig)
{
@@ -53,7 +53,7 @@ BOOL CModuleConfigure_Json::ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XE
Json::Value st_JsonRoot;
JSONCPP_STRING st_JsonError;
Json::CharReaderBuilder st_JsonBuilder;
- //ȡļݵ
+ //读取配置文件所有内容到缓冲区
FILE* pSt_File = _tfopen(lpszConfigFile, _T("rb"));
if (NULL == pSt_File)
{
@@ -73,7 +73,7 @@ BOOL CModuleConfigure_Json::ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XE
nCount += nRet;
}
fclose(pSt_File);
- //ʼļ
+ //开始解析配置文件
std::unique_ptr const pSt_JsonReader(st_JsonBuilder.newCharReader());
if (!pSt_JsonReader->parse(tszMsgBuffer, tszMsgBuffer + nCount, &st_JsonRoot, &st_JsonError))
{
@@ -130,7 +130,7 @@ BOOL CModuleConfigure_Json::ModuleConfigure_Json_File(LPCTSTR lpszConfigFile, XE
pSt_ServerConfig->st_XAuth.bAuth = st_JsonXAuth["bAuth"].asInt();
_tcscpy(pSt_ServerConfig->st_XAuth.tszAuthFile, st_JsonXAuth["tszAuthFile"].asCString());
- if (st_JsonRoot["XVer"].empty() || (2 != st_JsonRoot["XVer"].size()))
+ if (st_JsonRoot["XVer"].empty())
{
Config_IsErrorOccur = TRUE;
Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_XVER;
diff --git a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.h b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.h
index 43943edc0c503c4448013b57991ba6badf1df76b..7ff49474b6cf2a6cc69fec7cb2a5de586d2663c1 100644
--- a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.h
+++ b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.h
@@ -1,13 +1,13 @@
-#pragma once
+#pragma once
/********************************************************************
// Created: 2021/12/02 16:08:16
// File Name: D:\XEngine_ServiceApp\XEngine_Source\XEngine_ModuleConfigure\ModuleConfigure_Json\ModuleConfigure_Json.h
// File Path: D:\XEngine_ServiceApp\XEngine_Source\XEngine_ModuleConfigure\ModuleConfigure_Json
// File Base: ModuleConfigure_Json
// File Ext: h
-// Project: XEngine(ͨ)
+// Project: XEngine(网络通信引擎)
// Author: qyt
-// Purpose: JSONļд
+// Purpose: JSON配置文件读写
// History:
*********************************************************************/
diff --git a/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj b/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj
index 4569d2ebbcfc8f7703634f2b9bfbdbd3eddfa10e..bb4e5ccdb31054d6bd23f71eb11b02f1602623aa 100644
--- a/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj
+++ b/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj
@@ -29,26 +29,26 @@
DynamicLibrary
true
- v142
+ v143
MultiByte
DynamicLibrary
false
- v142
+ v143
true
MultiByte
DynamicLibrary
true
- v142
- Unicode
+ v143
+ MultiByte
DynamicLibrary
false
- v142
+ v143
true
MultiByte
@@ -72,20 +72,22 @@
true
- $(XEngine_Include);$(IncludePath)
+ $(XEngine_Include);../XEngine_ThirdPart/jsoncpp;$(IncludePath)
$(XEngine_Lib32);$(LibraryPath)
false
- $(XEngine_Include);$(IncludePath)
+ $(XEngine_Include);../XEngine_ThirdPart/jsoncpp;$(IncludePath)
$(XEngine_Lib32);$(LibraryPath)
true
+ $(XEngine_Include);../XEngine_ThirdPart/jsoncpp;$(IncludePath)
+ $(XEngine_Lib64);$(LibraryPath)
false
- $(XEngine_Include);$(IncludePath)
+ $(XEngine_Include);../XEngine_ThirdPart/jsoncpp;$(IncludePath)
$(XEngine_Lib64);$(LibraryPath)
@@ -131,7 +133,7 @@
Level3
true
- _DEBUG;XENGINEMODULECONFIGURE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
+ _DEBUG;XENGINEMODULECONFIGURE_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
Use
pch.h
diff --git a/XEngine_Source/XEngine_ModuleConfigure/pch.h b/XEngine_Source/XEngine_ModuleConfigure/pch.h
index e24f672848f073fca3936ef516997318d35a462f..2bc4ede385a54c7b3b90efa8140ed7ddb1d83bb6 100644
--- a/XEngine_Source/XEngine_ModuleConfigure/pch.h
+++ b/XEngine_Source/XEngine_ModuleConfigure/pch.h
@@ -11,13 +11,6 @@
// 添加要在此处预编译的标头
#include "framework.h"
#include
-#include
-#else
-#ifdef _CENTOS
-#include
-#else
-#include
-#endif
#endif
#endif //PCH_H
#include
@@ -25,6 +18,7 @@
#include
#include
#include
+#include
using namespace std;
#include
#include
@@ -42,4 +36,20 @@ using namespace std;
// History:
*********************************************************************/
extern BOOL Config_IsErrorOccur;
-extern DWORD Config_dwErrorCode;
\ No newline at end of file
+extern DWORD Config_dwErrorCode;
+
+#ifdef _MSC_BUILD
+#ifdef _DEBUG
+#ifdef _WIN64
+#pragma comment(lib,"../x64/Debug/jsoncpp")
+#else
+#pragma comment(lib,"../Debug/jsoncpp")
+#endif
+#else
+#ifdef _WIN64
+#pragma comment(lib,"../x64/Release/jsoncpp")
+#else
+#pragma comment(lib,"../Release/jsoncpp")
+#endif
+#endif
+#endif
\ No newline at end of file
diff --git a/XEngine_Source/XEngine_ServiceApp/Makefile b/XEngine_Source/XEngine_ServiceApp/Makefile
index d655e027012c4e8e98e9a929f609ef9c55b1bfbc..784331eb00656541a2c80914995aed3d8527c02d 100644
--- a/XEngine_Source/XEngine_ServiceApp/Makefile
+++ b/XEngine_Source/XEngine_ServiceApp/Makefile
@@ -1,8 +1,12 @@
CC = g++ -Wall
RELEASE = 0
UNICODE = 0
-LOADBIN = -L /usr/local/lib/XEngine_Release/XEngine_BaseLib -L /usr/local/lib/XEngine_Release/XEngine_Core -L /usr/local/lib/XEngine_Release/XEngine_HelpComponents -L /usr/local/lib/XEngine_Release/XEngine_RfcComponents -L /usr/local/lib/XEngine_Release/XEngine_Client -L /usr/local/lib/XEngine_Release/XEngine_NetHelp -L ../XEngine_ModuleConfigure -L ../XEngine_ModuleAuthorize
-LIB = -lXEngine_BaseLib -lXEngine_Algorithm -lXEngine_Core -lXEngine_OPenSsl -lXEngine_ManagePool -lXEngine_NetXApi -lHelpComponents_XLog -lRfcComponents_ProxyProtocol -lXClient_Socket -lNetHelp_APIHelp -lXEngine_ModuleConfigure -lXEngine_ModuleAuthorize
+LOADBIN = -L /usr/local/lib/XEngine_Release/XEngine_BaseLib -L /usr/local/lib/XEngine_Release/XEngine_Core -L /usr/local/lib/XEngine_Release/XEngine_HelpComponents -L /usr/local/lib/XEngine_Release/XEngine_RfcComponents -L /usr/local/lib/XEngine_Release/XEngine_Client -L /usr/local/lib/XEngine_Release/XEngine_NetHelp \
+ -L ../XEngine_ThirdPart/jsoncpp \
+ -L ../XEngine_ModuleConfigure -L ../XEngine_ModuleAuthorize
+LIB = -lXEngine_BaseLib -lXEngine_Algorithm -lXEngine_Core -lXEngine_OPenSsl -lXEngine_ManagePool -lXEngine_NetXApi -lHelpComponents_XLog -lRfcComponents_ProxyProtocol -lXClient_Socket -lNetHelp_APIHelp \
+ -ljsoncpp \
+ -lXEngine_ModuleConfigure -lXEngine_ModuleAuthorize
LIBEX = -static-libgcc -ldl -lrt -lpthread
LOADSO = -Wl,-rpath=./,--disable-new-dtags
LIBINCLUDE = XEngine_Configure.o XEngine_Network.o XEngine_SocksTask.o XEngine_TunnelTask.o XEngine_ServiceApp.o
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_Hdr.h b/XEngine_Source/XEngine_ServiceApp/XEngine_Hdr.h
index c17ddb20065ac8432ee435077a9fbfaa727f5470..8cd2696fcfff2e9d639db80256977b25fb7cf22b 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_Hdr.h
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_Hdr.h
@@ -8,7 +8,7 @@
#include
#include
#include
-#ifdef _WINDOWS
+#ifdef _MSC_BUILD
#include
#include
#else
@@ -82,7 +82,7 @@ extern XENGINE_SERVICECONFIG st_ServiceConfig;
#define XENGINE_CLIENT_CLOSE_SERVICE 3
//连接库
-#ifdef _WINDOWS
+#ifdef _MSC_BUILD
#ifdef _WIN64
#pragma comment(lib,"../x64/Release/XEngine_ModuleConfigure.lib")
#pragma comment(lib,"../x64/Release/XEngine_ModuleAuthorize.lib")
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.cpp
index f0eb0c1c32c0ef0995fd77cc667ece113efdb612..e3b225d96031ec3003de09a9c6998a4267cc5f27 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.cpp
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.cpp
@@ -35,7 +35,7 @@ void ServiceApp_Stop(int signo)
//LINUX守护进程
static int ServiceApp_Deamon()
{
-#ifndef _WINDOWS
+#ifndef _MSC_BUILD
pid_t nPID = 0;
int nStatus = 0;
nPID = fork();
@@ -65,7 +65,7 @@ static int ServiceApp_Deamon()
int main(int argc, char** argv)
{
-#ifdef _WINDOWS
+#ifdef _MSC_BUILD
WSADATA st_WSAData;
WSAStartup(MAKEWORD(2, 2), &st_WSAData);
#endif
@@ -205,7 +205,7 @@ XENGINE_SERVICEAPP_EXIT:
HelpComponents_XLog_Destroy(xhLog);
ModuleAuthorize_User_Destory();
}
-#ifdef _WINDOWS
+#ifdef _MSC_BUILD
WSACleanup();
#endif
return 0;
diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.vcxproj b/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.vcxproj
index 49064fab16e7a10ea8c727e8947108625556b1ab..2ef6fddc4c2d0c99ac266bb15121c4540a6fd8cc 100644
--- a/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.vcxproj
+++ b/XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.vcxproj
@@ -29,26 +29,26 @@
Application
true
- v142
+ v143
MultiByte
Application
false
- v142
+ v143
true
MultiByte
Application
true
- v142
- Unicode
+ v143
+ MultiByte
Application
false
- v142
+ v143
true
MultiByte
@@ -82,6 +82,8 @@
true
+ $(XEngine_Include);$(IncludePath)
+ $(XEngine_Lib64);$(LibraryPath)
false
@@ -123,7 +125,7 @@
Level3
true
- _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ _DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
true
diff --git a/XEngine_Source/XEngine_ThirdPart/jsoncpp/Makefile b/XEngine_Source/XEngine_ThirdPart/jsoncpp/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..30dbd85ab2df273f2653cfe72e063176644ad6a8
--- /dev/null
+++ b/XEngine_Source/XEngine_ThirdPart/jsoncpp/Makefile
@@ -0,0 +1,46 @@
+CC = g++ -Wall -std=c++17 -fPIC
+RELEASE = 0
+UNICODE = 0
+INCLUDE = -I ./
+FILECENTOS = /etc/redhat-release
+LOADBIN =
+LIB =
+LIBEX = -static-libgcc -lrt -ldl -lpthread
+LOADSO = -Wl,-rpath=
+LIBINCLUDE = json_reader.o json_value.o json_writer.o
+
+ifeq ($(RELEASE),1)
+FLAGS = -c -O2
+DEBUG =
+else
+FLAGS = -c -lc_p
+DEBUG = -g -pg
+endif
+
+ifeq ($(UNICODE),1)
+UNICODE = -D _UNICODE
+else
+UNICODE =
+endif
+
+all:$(LIBINCLUDE)
+ $(CC) $(DEBUG) $(LIBINCLUDE) -o libjsoncpp.so -shared -fPIC $(LOADBIN) $(LIB) $(LIBEX) $(LOADSO)
+
+json_reader.o:json_reader.cpp
+ $(CC) $(DEBUG) $(FLAGS) $(UNICODE) $(INCLUDE) json_reader.cpp
+json_value.o:json_value.cpp
+ $(CC) $(DEBUG) $(FLAGS) $(UNICODE) $(INCLUDE) json_value.cpp
+json_writer.o:json_writer.cpp
+ $(CC) $(DEBUG) $(FLAGS) $(UNICODE) $(INCLUDE) json_writer.cpp
+
+InstallAll:InstallSo
+InstallSo:./libjsoncpp.so
+ cp ./libjsoncpp.so ../../../XEngine_Release/libjsoncpp.so
+
+
+
+CleanAll:CleanObj CleanMk
+CleanObj:
+ rm *.o
+CleanMk:
+ rm *.so
diff --git a/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/allocator.h b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/allocator.h
new file mode 100644
index 0000000000000000000000000000000000000000..d669dda90baefec39e320a09c7d9005bc1a2e81e
--- /dev/null
+++ b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/allocator.h
@@ -0,0 +1,88 @@
+// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_ALLOCATOR_H_INCLUDED
+#define JSON_ALLOCATOR_H_INCLUDED
+
+#include
+#include
+
+#pragma pack(push, 8)
+
+namespace Json {
+template class SecureAllocator {
+public:
+ // Type definitions
+ using value_type = T;
+ using pointer = T*;
+ using const_pointer = const T*;
+ using reference = T&;
+ using const_reference = const T&;
+ using size_type = std::size_t;
+ using difference_type = std::ptrdiff_t;
+
+ /**
+ * Allocate memory for N items using the standard allocator.
+ */
+ pointer allocate(size_type n) {
+ // allocate using "global operator new"
+ return static_cast(::operator new(n * sizeof(T)));
+ }
+
+ /**
+ * Release memory which was allocated for N items at pointer P.
+ *
+ * The memory block is filled with zeroes before being released.
+ */
+ void deallocate(pointer p, size_type n) {
+ // memset_s is used because memset may be optimized away by the compiler
+ memset_s(p, n * sizeof(T), 0, n * sizeof(T));
+ // free using "global operator delete"
+ ::operator delete(p);
+ }
+
+ /**
+ * Construct an item in-place at pointer P.
+ */
+ template void construct(pointer p, Args&&... args) {
+ // construct using "placement new" and "perfect forwarding"
+ ::new (static_cast(p)) T(std::forward(args)...);
+ }
+
+ size_type max_size() const { return size_t(-1) / sizeof(T); }
+
+ pointer address(reference x) const { return std::addressof(x); }
+
+ const_pointer address(const_reference x) const { return std::addressof(x); }
+
+ /**
+ * Destroy an item in-place at pointer P.
+ */
+ void destroy(pointer p) {
+ // destroy using "explicit destructor"
+ p->~T();
+ }
+
+ // Boilerplate
+ SecureAllocator() {}
+ template SecureAllocator(const SecureAllocator&) {}
+ template struct rebind { using other = SecureAllocator; };
+};
+
+template
+bool operator==(const SecureAllocator&, const SecureAllocator&) {
+ return true;
+}
+
+template
+bool operator!=(const SecureAllocator&, const SecureAllocator&) {
+ return false;
+}
+
+} // namespace Json
+
+#pragma pack(pop)
+
+#endif // JSON_ALLOCATOR_H_INCLUDED
diff --git a/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/assertions.h b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/assertions.h
new file mode 100644
index 0000000000000000000000000000000000000000..0a0120d6db8c0dd783d6209807163fc0b436bd9d
--- /dev/null
+++ b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/assertions.h
@@ -0,0 +1,61 @@
+// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_ASSERTIONS_H_INCLUDED
+#define JSON_ASSERTIONS_H_INCLUDED
+
+#include
+#include
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include "config.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+/** It should not be possible for a maliciously designed file to
+ * cause an abort() or seg-fault, so these macros are used only
+ * for pre-condition violations and internal logic errors.
+ */
+#if JSON_USE_EXCEPTION
+
+// @todo <= add detail about condition in exception
+#define JSON_ASSERT(condition) \
+ do { \
+ if (!(condition)) { \
+ Json::throwLogicError("assert json failed"); \
+ } \
+ } while (0)
+
+#define JSON_FAIL_MESSAGE(message) \
+ do { \
+ OStringStream oss; \
+ oss << message; \
+ Json::throwLogicError(oss.str()); \
+ abort(); \
+ } while (0)
+
+#else // JSON_USE_EXCEPTION
+
+#define JSON_ASSERT(condition) assert(condition)
+
+// The call to assert() will show the failure message in debug builds. In
+// release builds we abort, for a core-dump or debugger.
+#define JSON_FAIL_MESSAGE(message) \
+ { \
+ OStringStream oss; \
+ oss << message; \
+ assert(false && oss.str().c_str()); \
+ abort(); \
+ }
+
+#endif
+
+#define JSON_ASSERT_MESSAGE(condition, message) \
+ do { \
+ if (!(condition)) { \
+ JSON_FAIL_MESSAGE(message); \
+ } \
+ } while (0)
+
+#endif // JSON_ASSERTIONS_H_INCLUDED
diff --git a/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/config.h b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/config.h
new file mode 100644
index 0000000000000000000000000000000000000000..81d7969c21498da7453b02cf8fba2cb08c39b227
--- /dev/null
+++ b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/config.h
@@ -0,0 +1,150 @@
+// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_CONFIG_H_INCLUDED
+#define JSON_CONFIG_H_INCLUDED
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+// If non-zero, the library uses exceptions to report bad input instead of C
+// assertion macros. The default is to use exceptions.
+#ifndef JSON_USE_EXCEPTION
+#define JSON_USE_EXCEPTION 1
+#endif
+
+// Temporary, tracked for removal with issue #982.
+#ifndef JSON_USE_NULLREF
+#define JSON_USE_NULLREF 1
+#endif
+
+/// If defined, indicates that the source file is amalgamated
+/// to prevent private header inclusion.
+/// Remarks: it is automatically defined in the generated amalgamated header.
+// #define JSON_IS_AMALGAMATION
+
+// Export macros for DLL visibility
+#if defined(JSON_DLL_BUILD)
+#if defined(_MSC_VER) || defined(__MINGW32__)
+#define JSON_API __declspec(dllexport)
+#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
+#elif defined(__GNUC__) || defined(__clang__)
+#define JSON_API __attribute__((visibility("default")))
+#endif // if defined(_MSC_VER)
+
+#elif defined(JSON_DLL)
+#if defined(_MSC_VER) || defined(__MINGW32__)
+#define JSON_API __declspec(dllimport)
+#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
+#endif // if defined(_MSC_VER)
+#endif // ifdef JSON_DLL_BUILD
+
+#if !defined(JSON_API)
+#define JSON_API
+#endif
+
+#if defined(_MSC_VER) && _MSC_VER < 1800
+#error \
+ "ERROR: Visual Studio 12 (2013) with _MSC_VER=1800 is the oldest supported compiler with sufficient C++11 capabilities"
+#endif
+
+#if defined(_MSC_VER) && _MSC_VER < 1900
+// As recommended at
+// https://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010
+extern JSON_API int msvc_pre1900_c99_snprintf(char* outBuf, size_t size,
+ const char* format, ...);
+#define jsoncpp_snprintf msvc_pre1900_c99_snprintf
+#else
+#define jsoncpp_snprintf std::snprintf
+#endif
+
+// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
+// integer
+// Storages, and 64 bits integer support is disabled.
+// #define JSON_NO_INT64 1
+
+// JSONCPP_OVERRIDE is maintained for backwards compatibility of external tools.
+// C++11 should be used directly in JSONCPP.
+#define JSONCPP_OVERRIDE override
+
+#ifdef __clang__
+#if __has_extension(attribute_deprecated_with_message)
+#define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message)))
+#endif
+#elif defined(__GNUC__) // not clang (gcc comes later since clang emulates gcc)
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
+#define JSONCPP_DEPRECATED(message) __attribute__((deprecated(message)))
+#elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
+#endif // GNUC version
+#elif defined(_MSC_VER) // MSVC (after clang because clang on Windows emulates
+ // MSVC)
+#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
+#endif // __clang__ || __GNUC__ || _MSC_VER
+
+#if !defined(JSONCPP_DEPRECATED)
+#define JSONCPP_DEPRECATED(message)
+#endif // if !defined(JSONCPP_DEPRECATED)
+
+#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 6))
+#define JSON_USE_INT64_DOUBLE_CONVERSION 1
+#endif
+
+#if !defined(JSON_IS_AMALGAMATION)
+
+#include "allocator.h"
+#include "version.h"
+
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+namespace Json {
+using Int = int;
+using UInt = unsigned int;
+#if defined(JSON_NO_INT64)
+using LargestInt = int;
+using LargestUInt = unsigned int;
+#undef JSON_HAS_INT64
+#else // if defined(JSON_NO_INT64)
+// For Microsoft Visual use specific types as long long is not supported
+#if defined(_MSC_VER) // Microsoft Visual Studio
+using Int64 = __int64;
+using UInt64 = unsigned __int64;
+#else // if defined(_MSC_VER) // Other platforms, use long long
+using Int64 = int64_t;
+using UInt64 = uint64_t;
+#endif // if defined(_MSC_VER)
+using LargestInt = Int64;
+using LargestUInt = UInt64;
+#define JSON_HAS_INT64
+#endif // if defined(JSON_NO_INT64)
+
+template
+using Allocator =
+ typename std::conditional,
+ std::allocator>::type;
+using String = std::basic_string, Allocator>;
+using IStringStream =
+ std::basic_istringstream;
+using OStringStream =
+ std::basic_ostringstream;
+using IStream = std::istream;
+using OStream = std::ostream;
+} // namespace Json
+
+// Legacy names (formerly macros).
+using JSONCPP_STRING = Json::String;
+using JSONCPP_ISTRINGSTREAM = Json::IStringStream;
+using JSONCPP_OSTRINGSTREAM = Json::OStringStream;
+using JSONCPP_ISTREAM = Json::IStream;
+using JSONCPP_OSTREAM = Json::OStream;
+
+#endif // JSON_CONFIG_H_INCLUDED
diff --git a/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/forwards.h b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/forwards.h
new file mode 100644
index 0000000000000000000000000000000000000000..733b9d68f91121d80097eccee7bc0856c60304c1
--- /dev/null
+++ b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/forwards.h
@@ -0,0 +1,43 @@
+// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_FORWARDS_H_INCLUDED
+#define JSON_FORWARDS_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include "config.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+namespace Json {
+
+// writer.h
+class StreamWriter;
+class StreamWriterBuilder;
+class Writer;
+class FastWriter;
+class StyledWriter;
+class StyledStreamWriter;
+
+// reader.h
+class Reader;
+class CharReader;
+class CharReaderBuilder;
+
+// json_features.h
+class Features;
+
+// value.h
+using ArrayIndex = unsigned int;
+class StaticString;
+class Path;
+class PathArgument;
+class Value;
+class ValueIteratorBase;
+class ValueIterator;
+class ValueConstIterator;
+
+} // namespace Json
+
+#endif // JSON_FORWARDS_H_INCLUDED
diff --git a/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/json.h b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/json.h
new file mode 100644
index 0000000000000000000000000000000000000000..c6a9bbddd3fe9b930d170c32aa2a26f7eba115a2
--- /dev/null
+++ b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/json.h
@@ -0,0 +1,15 @@
+// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_JSON_H_INCLUDED
+#define JSON_JSON_H_INCLUDED
+
+#include "config.h"
+#include "json_features.h"
+#include "reader.h"
+#include "value.h"
+#include "writer.h"
+
+#endif // JSON_JSON_H_INCLUDED
diff --git a/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/json_features.h b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/json_features.h
new file mode 100644
index 0000000000000000000000000000000000000000..6d881b80bbad1dc431c8d66bc16231bd511801e6
--- /dev/null
+++ b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/json_features.h
@@ -0,0 +1,61 @@
+// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_FEATURES_H_INCLUDED
+#define JSON_FEATURES_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include "forwards.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+#pragma pack(push, 8)
+
+namespace Json {
+
+/** \brief Configuration passed to reader and writer.
+ * This configuration object can be used to force the Reader or Writer
+ * to behave in a standard conforming way.
+ */
+class JSON_API Features {
+public:
+ /** \brief A configuration that allows all features and assumes all strings
+ * are UTF-8.
+ * - C & C++ comments are allowed
+ * - Root object can be any JSON value
+ * - Assumes Value strings are encoded in UTF-8
+ */
+ static Features all();
+
+ /** \brief A configuration that is strictly compatible with the JSON
+ * specification.
+ * - Comments are forbidden.
+ * - Root object must be either an array or an object value.
+ * - Assumes Value strings are encoded in UTF-8
+ */
+ static Features strictMode();
+
+ /** \brief Initialize the configuration like JsonConfig::allFeatures;
+ */
+ Features();
+
+ /// \c true if comments are allowed. Default: \c true.
+ bool allowComments_{true};
+
+ /// \c true if root must be either an array or an object value. Default: \c
+ /// false.
+ bool strictRoot_{false};
+
+ /// \c true if dropped null placeholders are allowed. Default: \c false.
+ bool allowDroppedNullPlaceholders_{false};
+
+ /// \c true if numeric object key are allowed. Default: \c false.
+ bool allowNumericKeys_{false};
+};
+
+} // namespace Json
+
+#pragma pack(pop)
+
+#endif // JSON_FEATURES_H_INCLUDED
diff --git a/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/reader.h b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/reader.h
new file mode 100644
index 0000000000000000000000000000000000000000..775037e750c6ed1779ce8cd8dae87e26ca97d327
--- /dev/null
+++ b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/reader.h
@@ -0,0 +1,405 @@
+// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_READER_H_INCLUDED
+#define JSON_READER_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include "json_features.h"
+#include "value.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+#include
+#include
+#include
+#include
+#include
+
+// Disable warning C4251: : needs to have dll-interface to
+// be used by...
+#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+#pragma warning(push)
+#pragma warning(disable : 4251)
+#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+
+#pragma pack(push, 8)
+
+namespace Json {
+
+/** \brief Unserialize a JSON document into a
+ * Value.
+ *
+ * \deprecated Use CharReader and CharReaderBuilder.
+ */
+
+class JSON_API Reader {
+public:
+ using Char = char;
+ using Location = const Char*;
+
+ /** \brief An error tagged with where in the JSON text it was encountered.
+ *
+ * The offsets give the [start, limit) range of bytes within the text. Note
+ * that this is bytes, not codepoints.
+ */
+ struct StructuredError {
+ ptrdiff_t offset_start;
+ ptrdiff_t offset_limit;
+ String message;
+ };
+
+ /** \brief Constructs a Reader allowing all features for parsing.
+ * \deprecated Use CharReader and CharReaderBuilder.
+ */
+ Reader();
+
+ /** \brief Constructs a Reader allowing the specified feature set for parsing.
+ * \deprecated Use CharReader and CharReaderBuilder.
+ */
+ Reader(const Features& features);
+
+ /** \brief Read a Value from a JSON
+ * document.
+ *
+ * \param document UTF-8 encoded string containing the document
+ * to read.
+ * \param[out] root Contains the root value of the document if it
+ * was successfully parsed.
+ * \param collectComments \c true to collect comment and allow writing
+ * them back during serialization, \c false to
+ * discard comments. This parameter is ignored
+ * if Features::allowComments_ is \c false.
+ * \return \c true if the document was successfully parsed, \c false if an
+ * error occurred.
+ */
+ bool parse(const std::string& document, Value& root,
+ bool collectComments = true);
+
+ /** \brief Read a Value from a JSON
+ * document.
+ *
+ * \param beginDoc Pointer on the beginning of the UTF-8 encoded
+ * string of the document to read.
+ * \param endDoc Pointer on the end of the UTF-8 encoded string
+ * of the document to read. Must be >= beginDoc.
+ * \param[out] root Contains the root value of the document if it
+ * was successfully parsed.
+ * \param collectComments \c true to collect comment and allow writing
+ * them back during serialization, \c false to
+ * discard comments. This parameter is ignored
+ * if Features::allowComments_ is \c false.
+ * \return \c true if the document was successfully parsed, \c false if an
+ * error occurred.
+ */
+ bool parse(const char* beginDoc, const char* endDoc, Value& root,
+ bool collectComments = true);
+
+ /// \brief Parse from input stream.
+ /// \see Json::operator>>(std::istream&, Json::Value&).
+ bool parse(IStream& is, Value& root, bool collectComments = true);
+
+ /** \brief Returns a user friendly string that list errors in the parsed
+ * document.
+ *
+ * \return Formatted error message with the list of errors with their
+ * location in the parsed document. An empty string is returned if no error
+ * occurred during parsing.
+ * \deprecated Use getFormattedErrorMessages() instead (typo fix).
+ */
+ JSONCPP_DEPRECATED("Use getFormattedErrorMessages() instead.")
+ String getFormatedErrorMessages() const;
+
+ /** \brief Returns a user friendly string that list errors in the parsed
+ * document.
+ *
+ * \return Formatted error message with the list of errors with their
+ * location in the parsed document. An empty string is returned if no error
+ * occurred during parsing.
+ */
+ String getFormattedErrorMessages() const;
+
+ /** \brief Returns a vector of structured errors encountered while parsing.
+ *
+ * \return A (possibly empty) vector of StructuredError objects. Currently
+ * only one error can be returned, but the caller should tolerate multiple
+ * errors. This can occur if the parser recovers from a non-fatal parse
+ * error and then encounters additional errors.
+ */
+ std::vector getStructuredErrors() const;
+
+ /** \brief Add a semantic error message.
+ *
+ * \param value JSON Value location associated with the error
+ * \param message The error message.
+ * \return \c true if the error was successfully added, \c false if the Value
+ * offset exceeds the document size.
+ */
+ bool pushError(const Value& value, const String& message);
+
+ /** \brief Add a semantic error message with extra context.
+ *
+ * \param value JSON Value location associated with the error
+ * \param message The error message.
+ * \param extra Additional JSON Value location to contextualize the error
+ * \return \c true if the error was successfully added, \c false if either
+ * Value offset exceeds the document size.
+ */
+ bool pushError(const Value& value, const String& message, const Value& extra);
+
+ /** \brief Return whether there are any errors.
+ *
+ * \return \c true if there are no errors to report \c false if errors have
+ * occurred.
+ */
+ bool good() const;
+
+private:
+ enum TokenType {
+ tokenEndOfStream = 0,
+ tokenObjectBegin,
+ tokenObjectEnd,
+ tokenArrayBegin,
+ tokenArrayEnd,
+ tokenString,
+ tokenNumber,
+ tokenTrue,
+ tokenFalse,
+ tokenNull,
+ tokenArraySeparator,
+ tokenMemberSeparator,
+ tokenComment,
+ tokenError
+ };
+
+ class Token {
+ public:
+ TokenType type_;
+ Location start_;
+ Location end_;
+ };
+
+ class ErrorInfo {
+ public:
+ Token token_;
+ String message_;
+ Location extra_;
+ };
+
+ using Errors = std::deque;
+
+ bool readToken(Token& token);
+ void skipSpaces();
+ bool match(const Char* pattern, int patternLength);
+ bool readComment();
+ bool readCStyleComment();
+ bool readCppStyleComment();
+ bool readString();
+ void readNumber();
+ bool readValue();
+ bool readObject(Token& token);
+ bool readArray(Token& token);
+ bool decodeNumber(Token& token);
+ bool decodeNumber(Token& token, Value& decoded);
+ bool decodeString(Token& token);
+ bool decodeString(Token& token, String& decoded);
+ bool decodeDouble(Token& token);
+ bool decodeDouble(Token& token, Value& decoded);
+ bool decodeUnicodeCodePoint(Token& token, Location& current, Location end,
+ unsigned int& unicode);
+ bool decodeUnicodeEscapeSequence(Token& token, Location& current,
+ Location end, unsigned int& unicode);
+ bool addError(const String& message, Token& token, Location extra = nullptr);
+ bool recoverFromError(TokenType skipUntilToken);
+ bool addErrorAndRecover(const String& message, Token& token,
+ TokenType skipUntilToken);
+ void skipUntilSpace();
+ Value& currentValue();
+ Char getNextChar();
+ void getLocationLineAndColumn(Location location, int& line,
+ int& column) const;
+ String getLocationLineAndColumn(Location location) const;
+ void addComment(Location begin, Location end, CommentPlacement placement);
+ void skipCommentTokens(Token& token);
+
+ static bool containsNewLine(Location begin, Location end);
+ static String normalizeEOL(Location begin, Location end);
+
+ using Nodes = std::stack;
+ Nodes nodes_;
+ Errors errors_;
+ String document_;
+ Location begin_{};
+ Location end_{};
+ Location current_{};
+ Location lastValueEnd_{};
+ Value* lastValue_{};
+ String commentsBefore_;
+ Features features_;
+ bool collectComments_{};
+}; // Reader
+
+/** Interface for reading JSON from a char array.
+ */
+class JSON_API CharReader {
+public:
+ virtual ~CharReader() = default;
+ /** \brief Read a Value from a JSON
+ * document. The document must be a UTF-8 encoded string containing the
+ * document to read.
+ *
+ * \param beginDoc Pointer on the beginning of the UTF-8 encoded string
+ * of the document to read.
+ * \param endDoc Pointer on the end of the UTF-8 encoded string of the
+ * document to read. Must be >= beginDoc.
+ * \param[out] root Contains the root value of the document if it was
+ * successfully parsed.
+ * \param[out] errs Formatted error messages (if not NULL) a user
+ * friendly string that lists errors in the parsed
+ * document.
+ * \return \c true if the document was successfully parsed, \c false if an
+ * error occurred.
+ */
+ virtual bool parse(char const* beginDoc, char const* endDoc, Value* root,
+ String* errs) = 0;
+
+ class JSON_API Factory {
+ public:
+ virtual ~Factory() = default;
+ /** \brief Allocate a CharReader via operator new().
+ * \throw std::exception if something goes wrong (e.g. invalid settings)
+ */
+ virtual CharReader* newCharReader() const = 0;
+ }; // Factory
+}; // CharReader
+
+/** \brief Build a CharReader implementation.
+ *
+ * Usage:
+ * \code
+ * using namespace Json;
+ * CharReaderBuilder builder;
+ * builder["collectComments"] = false;
+ * Value value;
+ * String errs;
+ * bool ok = parseFromStream(builder, std::cin, &value, &errs);
+ * \endcode
+ */
+class JSON_API CharReaderBuilder : public CharReader::Factory {
+public:
+ // Note: We use a Json::Value so that we can add data-members to this class
+ // without a major version bump.
+ /** Configuration of this builder.
+ * These are case-sensitive.
+ * Available settings (case-sensitive):
+ * - `"collectComments": false or true`
+ * - true to collect comment and allow writing them back during
+ * serialization, false to discard comments. This parameter is ignored
+ * if allowComments is false.
+ * - `"allowComments": false or true`
+ * - true if comments are allowed.
+ * - `"allowTrailingCommas": false or true`
+ * - true if trailing commas in objects and arrays are allowed.
+ * - `"strictRoot": false or true`
+ * - true if root must be either an array or an object value
+ * - `"allowDroppedNullPlaceholders": false or true`
+ * - true if dropped null placeholders are allowed. (See
+ * StreamWriterBuilder.)
+ * - `"allowNumericKeys": false or true`
+ * - true if numeric object keys are allowed.
+ * - `"allowSingleQuotes": false or true`
+ * - true if '' are allowed for strings (both keys and values)
+ * - `"stackLimit": integer`
+ * - Exceeding stackLimit (recursive depth of `readValue()`) will cause an
+ * exception.
+ * - This is a security issue (seg-faults caused by deeply nested JSON), so
+ * the default is low.
+ * - `"failIfExtra": false or true`
+ * - If true, `parse()` returns false when extra non-whitespace trails the
+ * JSON value in the input string.
+ * - `"rejectDupKeys": false or true`
+ * - If true, `parse()` returns false when a key is duplicated within an
+ * object.
+ * - `"allowSpecialFloats": false or true`
+ * - If true, special float values (NaNs and infinities) are allowed and
+ * their values are lossfree restorable.
+ * - `"skipBom": false or true`
+ * - If true, if the input starts with the Unicode byte order mark (BOM),
+ * it is skipped.
+ *
+ * You can examine 'settings_` yourself to see the defaults. You can also
+ * write and read them just like any JSON Value.
+ * \sa setDefaults()
+ */
+ Json::Value settings_;
+
+ CharReaderBuilder();
+ ~CharReaderBuilder() override;
+
+ CharReader* newCharReader() const override;
+
+ /** \return true if 'settings' are legal and consistent;
+ * otherwise, indicate bad settings via 'invalid'.
+ */
+ bool validate(Json::Value* invalid) const;
+
+ /** A simple way to update a specific setting.
+ */
+ Value& operator[](const String& key);
+
+ /** Called by ctor, but you can use this to reset settings_.
+ * \pre 'settings' != NULL (but Json::null is fine)
+ * \remark Defaults:
+ * \snippet src/lib_json/json_reader.cpp CharReaderBuilderDefaults
+ */
+ static void setDefaults(Json::Value* settings);
+ /** Same as old Features::strictMode().
+ * \pre 'settings' != NULL (but Json::null is fine)
+ * \remark Defaults:
+ * \snippet src/lib_json/json_reader.cpp CharReaderBuilderStrictMode
+ */
+ static void strictMode(Json::Value* settings);
+};
+
+/** Consume entire stream and use its begin/end.
+ * Someday we might have a real StreamReader, but for now this
+ * is convenient.
+ */
+bool JSON_API parseFromStream(CharReader::Factory const&, IStream&, Value* root,
+ String* errs);
+
+/** \brief Read from 'sin' into 'root'.
+ *
+ * Always keep comments from the input JSON.
+ *
+ * This can be used to read a file into a particular sub-object.
+ * For example:
+ * \code
+ * Json::Value root;
+ * cin >> root["dir"]["file"];
+ * cout << root;
+ * \endcode
+ * Result:
+ * \verbatim
+ * {
+ * "dir": {
+ * "file": {
+ * // The input stream JSON would be nested here.
+ * }
+ * }
+ * }
+ * \endverbatim
+ * \throw std::exception on parse error.
+ * \see Json::operator<<()
+ */
+JSON_API IStream& operator>>(IStream&, Value&);
+
+} // namespace Json
+
+#pragma pack(pop)
+
+#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+#pragma warning(pop)
+#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+
+#endif // JSON_READER_H_INCLUDED
diff --git a/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/value.h b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/value.h
new file mode 100644
index 0000000000000000000000000000000000000000..d24ca53484c857a86612d451f9e80e91d044105c
--- /dev/null
+++ b/XEngine_Source/XEngine_ThirdPart/jsoncpp/json/value.h
@@ -0,0 +1,935 @@
+// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
+// Distributed under MIT license, or public domain if desired and
+// recognized in your jurisdiction.
+// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
+
+#ifndef JSON_H_INCLUDED
+#define JSON_H_INCLUDED
+
+#if !defined(JSON_IS_AMALGAMATION)
+#include "forwards.h"
+#endif // if !defined(JSON_IS_AMALGAMATION)
+
+// Conditional NORETURN attribute on the throw functions would:
+// a) suppress false positives from static code analysis
+// b) possibly improve optimization opportunities.
+#if !defined(JSONCPP_NORETURN)
+#if defined(_MSC_VER) && _MSC_VER == 1800
+#define JSONCPP_NORETURN __declspec(noreturn)
+#else
+#define JSONCPP_NORETURN [[noreturn]]
+#endif
+#endif
+
+// Support for '= delete' with template declarations was a late addition
+// to the c++11 standard and is rejected by clang 3.8 and Apple clang 8.2
+// even though these declare themselves to be c++11 compilers.
+#if !defined(JSONCPP_TEMPLATE_DELETE)
+#if defined(__clang__) && defined(__apple_build_version__)
+#if __apple_build_version__ <= 8000042
+#define JSONCPP_TEMPLATE_DELETE
+#endif
+#elif defined(__clang__)
+#if __clang_major__ == 3 && __clang_minor__ <= 8
+#define JSONCPP_TEMPLATE_DELETE
+#endif
+#endif
+#if !defined(JSONCPP_TEMPLATE_DELETE)
+#define JSONCPP_TEMPLATE_DELETE = delete
+#endif
+#endif
+
+#include
+#include
+#include