mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-07 08:14:58 +03:00
Cedar: implement detailed protocol info
This commit is contained in:
@ -9655,6 +9655,12 @@ void CmPrintStatusToListViewEx(LVB *b, RPC_CLIENT_GET_CONNECTION_STATUS *s, bool
|
||||
LvInsertAdd(b, 0, NULL, 2, _UU("CM_ST_UNDERLAY_PROTOCOL"), tmp);
|
||||
}
|
||||
|
||||
if (IsEmptyStr(s->ProtocolDetails) == false)
|
||||
{
|
||||
StrToUni(tmp, sizeof(tmp), s->ProtocolDetails);
|
||||
LvInsertAdd(b, 0, NULL, 2, _UU("CM_ST_PROTOCOL_DETAILS"), tmp);
|
||||
}
|
||||
|
||||
LvInsertAdd(b, 0, NULL, 2, _UU("CM_ST_UDP_ACCEL_ENABLED"), (s->IsUdpAccelerationEnabled ? _UU("CM_ST_YES") : _UU("CM_ST_NO")));
|
||||
LvInsertAdd(b, 0, NULL, 2, _UU("CM_ST_UDP_ACCEL_USING"), (s->IsUsingUdpAcceleration ? _UU("CM_ST_YES") : _UU("CM_ST_NO")));
|
||||
|
||||
|
@ -5818,6 +5818,9 @@ void CiGetSessionStatus(RPC_CLIENT_GET_CONNECTION_STATUS *st, SESSION *s)
|
||||
st->IsRUDPSession = s->IsRUDPSession;
|
||||
// Physical communication protocol
|
||||
StrCpy(st->UnderlayProtocol, sizeof(st->UnderlayProtocol), s->UnderlayProtocol);
|
||||
// Protocol details
|
||||
StrCpy(st->ProtocolDetails, sizeof(st->ProtocolDetails), s->ProtocolDetails);
|
||||
Trim(st->ProtocolDetails);
|
||||
// UDP acceleration function
|
||||
st->IsUdpAccelerationEnabled = s->UseUdpAcceleration;
|
||||
st->IsUsingUdpAcceleration = s->IsUsingUdpAcceleration;
|
||||
|
@ -341,6 +341,7 @@ struct RPC_CLIENT_GET_CONNECTION_STATUS
|
||||
bool UseCompress; // Use of compression
|
||||
bool IsRUDPSession; // R-UDP session
|
||||
char UnderlayProtocol[64]; // Physical communication protocol
|
||||
char ProtocolDetails[256]; // Protocol details
|
||||
bool IsUdpAccelerationEnabled; // The UDP acceleration is enabled
|
||||
bool IsUsingUdpAcceleration; // Using the UDP acceleration function
|
||||
char SessionName[MAX_SESSION_NAME_LEN + 1]; // Session name
|
||||
|
@ -15155,6 +15155,12 @@ void CmdPrintStatusToListViewEx(CT *ct, RPC_CLIENT_GET_CONNECTION_STATUS *s, boo
|
||||
CtInsert(ct, _UU("CM_ST_UNDERLAY_PROTOCOL"), tmp);
|
||||
}
|
||||
|
||||
if (IsEmptyStr(s->ProtocolDetails) == false)
|
||||
{
|
||||
StrToUni(tmp, sizeof(tmp), s->ProtocolDetails);
|
||||
CtInsert(ct, _UU("CM_ST_PROTOCOL_DETAILS"), tmp);
|
||||
}
|
||||
|
||||
CtInsert(ct, _UU("CM_ST_UDP_ACCEL_ENABLED"), (s->IsUdpAccelerationEnabled ? _UU("CM_ST_YES") : _UU("CM_ST_NO")));
|
||||
CtInsert(ct, _UU("CM_ST_UDP_ACCEL_USING"), (s->IsUsingUdpAcceleration ? _UU("CM_ST_YES") : _UU("CM_ST_NO")));
|
||||
|
||||
|
@ -1479,8 +1479,8 @@ bool ServerAccept(CONNECTION *c)
|
||||
{
|
||||
if (IsEmptyStr(c->InProcPrefix) == false)
|
||||
{
|
||||
Format(c->FirstSock->UnderlayProtocol, sizeof(c->FirstSock->UnderlayProtocol),
|
||||
SOCK_UNDERLAY_INPROC_EX, c->InProcPrefix);
|
||||
Format(c->FirstSock->UnderlayProtocol, sizeof(c->FirstSock->UnderlayProtocol), SOCK_UNDERLAY_INPROC_EX, c->InProcPrefix);
|
||||
AddProtocolDetailsStr(c->FirstSock->UnderlayProtocol, sizeof(c->FirstSock->UnderlayProtocol), c->InProcPrefix);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2807,7 +2807,8 @@ bool ServerAccept(CONNECTION *c)
|
||||
// R-UDP session
|
||||
s->IsRUDPSession = true;
|
||||
s->RUdpMss = c->FirstSock->RUDP_OptimizedMss;
|
||||
Debug("Optimized MSS Value for R-UDP: %u\n", s->RUdpMss);
|
||||
Debug("ServerAccept(): Optimized MSS Value for R-UDP: %u\n", s->RUdpMss);
|
||||
AddProtocolDetailsKeyValueInt(s->ProtocolDetails, sizeof(s->ProtocolDetails), "RUDP_MSS", s->RUdpMss);
|
||||
}
|
||||
|
||||
if (enable_bulk_on_rudp)
|
||||
@ -2821,6 +2822,8 @@ bool ServerAccept(CONNECTION *c)
|
||||
|
||||
StrCpy(s->UnderlayProtocol, sizeof(s->UnderlayProtocol), c->FirstSock->UnderlayProtocol);
|
||||
|
||||
AddProtocolDetailsStr(s->ProtocolDetails, sizeof(s->ProtocolDetails), c->FirstSock->ProtocolDetails);
|
||||
|
||||
if (server != NULL)
|
||||
{
|
||||
s->NoSendSignature = server->NoSendSignature;
|
||||
@ -2912,6 +2915,7 @@ bool ServerAccept(CONNECTION *c)
|
||||
if (s->AdjustMss != 0)
|
||||
{
|
||||
Debug("AdjustMSS: %u\n", s->AdjustMss);
|
||||
AddProtocolDetailsKeyValueInt(s->ProtocolDetails, sizeof(s->ProtocolDetails), "AdjustMSS", s->AdjustMss);
|
||||
}
|
||||
|
||||
s->IsBridgeMode = (policy->NoBridge == false) || (policy->NoRouting == false);
|
||||
@ -2957,8 +2961,7 @@ bool ServerAccept(CONNECTION *c)
|
||||
{
|
||||
char ip[128];
|
||||
IPToStr(ip, sizeof(ip), &c->FirstSock->RemoteIP);
|
||||
HLog(hub, "LH_NEW_SESSION", c->Name, s->Name, ip, c->FirstSock->RemotePort,
|
||||
c->FirstSock->UnderlayProtocol);
|
||||
HLog(hub, "LH_NEW_SESSION", c->Name, s->Name, ip, c->FirstSock->RemotePort, c->FirstSock->UnderlayProtocol, c->FirstSock->ProtocolDetails);
|
||||
}
|
||||
|
||||
c->Session = s;
|
||||
@ -4704,9 +4707,13 @@ REDIRECTED:
|
||||
// Physical communication protocol
|
||||
StrCpy(c->Session->UnderlayProtocol, sizeof(c->Session->UnderlayProtocol), s->UnderlayProtocol);
|
||||
|
||||
AddProtocolDetailsStr(c->Session->ProtocolDetails, sizeof(c->Session->ProtocolDetails), s->ProtocolDetails);
|
||||
|
||||
if (c->Session->IsAzureSession)
|
||||
{
|
||||
StrCpy(c->Session->UnderlayProtocol, sizeof(c->Session->UnderlayProtocol), SOCK_UNDERLAY_AZURE);
|
||||
|
||||
AddProtocolDetailsStr(c->Session->ProtocolDetails, sizeof(c->Session->ProtocolDetails), "VPN Azure");
|
||||
}
|
||||
|
||||
if (c->Protocol == CONNECTION_UDP)
|
||||
|
@ -157,6 +157,7 @@ struct SESSION
|
||||
UINT NumDisconnected; // Number of socket disconnection
|
||||
bool NoReconnectToSession; // Disable to reconnect to the session
|
||||
char UnderlayProtocol[64]; // Physical communication protocol
|
||||
char ProtocolDetails[256]; // Protocol details
|
||||
/* !!! Do not correct the spelling to keep the backward protocol compatibility !!! */
|
||||
UINT64 FirstConnectionEstablisiedTime; // Connection completion time of the first connection
|
||||
UINT64 CurrentConnectionEstablishTime; // Completion time of this connection
|
||||
|
Reference in New Issue
Block a user