mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
Cedar/Protocol.c: Use real server IP in creating node info under direct mode
This commit is contained in:
parent
4eae5820f6
commit
bcba88ca73
@ -3826,7 +3826,18 @@ void CreateNodeInfo(NODE_INFO *info, CONNECTION *c)
|
|||||||
// Server host name
|
// Server host name
|
||||||
StrCpy(info->ServerHostname, sizeof(info->ServerHostname), c->ServerName);
|
StrCpy(info->ServerHostname, sizeof(info->ServerHostname), c->ServerName);
|
||||||
// Server IP address
|
// Server IP address
|
||||||
if (GetIP(&ip, info->ServerHostname))
|
if (s->ClientOption->ProxyType == PROXY_DIRECT)
|
||||||
|
{
|
||||||
|
if (IsIP6(&c->FirstSock->RemoteIP) == false)
|
||||||
|
{
|
||||||
|
info->ServerIpAddress = IPToUINT(&c->FirstSock->RemoteIP);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Copy(info->ServerIpAddress6, c->FirstSock->RemoteIP.address, sizeof(info->ServerIpAddress6));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (GetIP(&ip, info->ServerHostname))
|
||||||
{
|
{
|
||||||
if (IsIP6(&ip) == false)
|
if (IsIP6(&ip) == false)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user