Skip to content

Commit 48c0fb7

Browse files
committed
modify:configure field name
1 parent 6eb7a88 commit 48c0fb7

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

XEngine_Release/XEngine_Config/XEngine_Config.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"tszIPAddr": "192.168.1.12",
3-
"bDeamon": 0,
3+
"bDeamon": false,
44
"nSocksPort": 5400,
55
"nTunnelPort": 5401,
66
"nForwardPort": 5402,
@@ -13,15 +13,16 @@
1313
},
1414
"XTime": {
1515
"nTimeCheck": 3,
16-
"nSocksTimeOut": 5,
17-
"nTunnelTimeOut": 5,
18-
"nForwardTimeOut": 5,
16+
"nSocksTimeout": 5,
17+
"nTunnelTimeout": 5,
18+
"nForwardTimeout": 5,
1919
"nProxyTimeout": 5
2020
},
2121
"XLog": {
2222
"MaxSize": 1024000,
2323
"MaxCount": 10,
24-
"LogLeave": 17,
24+
"LogLeave": 32,
25+
"LogType": 17,
2526
"tszLogFile": "./XEngine_Log/XEngine_ProxyServiceApp.log"
2627
},
2728
"XReport":{
@@ -31,6 +32,6 @@
3132
},
3233
"XProxy": {
3334
"bEnable": false,
34-
"tszIPAddr": "10.0.1.89:5411"
35+
"tszIPAddr": "10.0.2.6:5001"
3536
}
3637
}

XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ typedef struct tag_XEngine_ServiceConfig
3131
struct
3232
{
3333
int nTimeCheck; //检测次数
34-
int nSocksTimeOut; //TCP超时时间
35-
int nTunnelTimeOut; //HTTP超时时间
36-
int nForwardTimeOut; //转发超时时间
34+
int nSocksTimeout; //TCP超时时间
35+
int nTunnelTimeout; //HTTP超时时间
36+
int nForwardTimeout; //转发超时时间
3737
int nProxyTimeout; //代理超时时间
3838
}st_XTime; //次数*时间=超时
3939
struct

XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE
8282
return false;
8383
}
8484
_tcsxcpy(pSt_ServerConfig->tszIPAddr, st_JsonRoot["tszIPAddr"].asCString());
85-
pSt_ServerConfig->bDeamon = st_JsonRoot["bDeamon"].asInt();
85+
pSt_ServerConfig->bDeamon = st_JsonRoot["bDeamon"].asBool();
8686
pSt_ServerConfig->nSocksPort = st_JsonRoot["nSocksPort"].asInt();
8787
pSt_ServerConfig->nTunnelPort = st_JsonRoot["nTunnelPort"].asInt();
8888
pSt_ServerConfig->nForwardPort = st_JsonRoot["nForwardPort"].asInt();
@@ -108,9 +108,9 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE
108108
}
109109
Json::Value st_JsonXTime = st_JsonRoot["XTime"];
110110
pSt_ServerConfig->st_XTime.nTimeCheck = st_JsonXTime["nTimeCheck"].asInt();
111-
pSt_ServerConfig->st_XTime.nSocksTimeOut = st_JsonXTime["nSocksTimeOut"].asInt();
112-
pSt_ServerConfig->st_XTime.nTunnelTimeOut = st_JsonXTime["nTunnelTimeOut"].asInt();
113-
pSt_ServerConfig->st_XTime.nForwardTimeOut = st_JsonXTime["nForwardTimeOut"].asInt();
111+
pSt_ServerConfig->st_XTime.nSocksTimeout = st_JsonXTime["nSocksTimeout"].asInt();
112+
pSt_ServerConfig->st_XTime.nTunnelTimeout = st_JsonXTime["nTunnelTimeout"].asInt();
113+
pSt_ServerConfig->st_XTime.nForwardTimeout = st_JsonXTime["nForwardTimeout"].asInt();
114114
pSt_ServerConfig->st_XTime.nProxyTimeout = st_JsonXTime["nProxyTimeout"].asInt();
115115

116116
if (st_JsonRoot["XLog"].empty() || (5 != st_JsonRoot["XLog"].size()))

XEngine_Source/XEngine_ServiceApp/XEngine_ServiceApp.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,15 @@ int main(int argc, char** argv)
163163
if (st_ServiceConfig.nSocksPort > 0)
164164
{
165165
//启动心跳
166-
if (st_ServiceConfig.st_XTime.nSocksTimeOut > 0)
166+
if (st_ServiceConfig.st_XTime.nSocksTimeout > 0)
167167
{
168-
xhSocksHeart = SocketOpt_HeartBeat_InitEx(st_ServiceConfig.st_XTime.nSocksTimeOut, st_ServiceConfig.st_XTime.nTimeCheck, Network_Callback_SocksHeart);
168+
xhSocksHeart = SocketOpt_HeartBeat_InitEx(st_ServiceConfig.st_XTime.nSocksTimeout, st_ServiceConfig.st_XTime.nTimeCheck, Network_Callback_SocksHeart);
169169
if (NULL == xhSocksHeart)
170170
{
171171
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,初始化Socks心跳服务失败,错误:%lX"), NetCore_GetLastError());
172172
goto XENGINE_SERVICEAPP_EXIT;
173173
}
174-
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化Socks心跳服务成功,时间:%d,次数:%d"), st_ServiceConfig.st_XTime.nSocksTimeOut, st_ServiceConfig.st_XTime.nTimeCheck);
174+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化Socks心跳服务成功,时间:%d,次数:%d"), st_ServiceConfig.st_XTime.nSocksTimeout, st_ServiceConfig.st_XTime.nTimeCheck);
175175
}
176176
else
177177
{
@@ -205,15 +205,15 @@ int main(int argc, char** argv)
205205
if (st_ServiceConfig.nTunnelPort > 0)
206206
{
207207
//启动心跳
208-
if (st_ServiceConfig.st_XTime.nTunnelTimeOut > 0)
208+
if (st_ServiceConfig.st_XTime.nTunnelTimeout > 0)
209209
{
210-
xhTunnelHeart = SocketOpt_HeartBeat_InitEx(st_ServiceConfig.st_XTime.nTunnelTimeOut, st_ServiceConfig.st_XTime.nTimeCheck, Network_Callback_TunnelHeart);
210+
xhTunnelHeart = SocketOpt_HeartBeat_InitEx(st_ServiceConfig.st_XTime.nTunnelTimeout, st_ServiceConfig.st_XTime.nTimeCheck, Network_Callback_TunnelHeart);
211211
if (NULL == xhTunnelHeart)
212212
{
213213
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,初始化Tunnel心跳服务失败,错误:%lX"), NetCore_GetLastError());
214214
goto XENGINE_SERVICEAPP_EXIT;
215215
}
216-
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化Tunnel心跳服务成功,时间:%d,次数:%d"), st_ServiceConfig.st_XTime.nTunnelTimeOut, st_ServiceConfig.st_XTime.nTimeCheck);
216+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化Tunnel心跳服务成功,时间:%d,次数:%d"), st_ServiceConfig.st_XTime.nTunnelTimeout, st_ServiceConfig.st_XTime.nTimeCheck);
217217
}
218218
else
219219
{
@@ -254,15 +254,15 @@ int main(int argc, char** argv)
254254
}
255255
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动Forward组包器成功"));
256256
//启动心跳
257-
if (st_ServiceConfig.st_XTime.nForwardTimeOut > 0)
257+
if (st_ServiceConfig.st_XTime.nForwardTimeout > 0)
258258
{
259-
xhForwardHeart = SocketOpt_HeartBeat_InitEx(st_ServiceConfig.st_XTime.nForwardTimeOut, st_ServiceConfig.st_XTime.nTimeCheck, Network_Callback_ForwardHeart);
259+
xhForwardHeart = SocketOpt_HeartBeat_InitEx(st_ServiceConfig.st_XTime.nForwardTimeout, st_ServiceConfig.st_XTime.nTimeCheck, Network_Callback_ForwardHeart);
260260
if (NULL == xhForwardHeart)
261261
{
262262
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,初始化Forward心跳服务失败,错误:%lX"), NetCore_GetLastError());
263263
goto XENGINE_SERVICEAPP_EXIT;
264264
}
265-
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化Forward心跳服务成功,时间:%d,次数:%d"), st_ServiceConfig.st_XTime.nForwardTimeOut, st_ServiceConfig.st_XTime.nTimeCheck);
265+
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化Forward心跳服务成功,时间:%d,次数:%d"), st_ServiceConfig.st_XTime.nForwardTimeout, st_ServiceConfig.st_XTime.nTimeCheck);
266266
}
267267
else
268268
{

0 commit comments

Comments
 (0)