Updates Data to JSON (#159)
This commit is contained in:
parent
d2f7e08de4
commit
1246a135f7
61 changed files with 18005 additions and 9152 deletions
|
|
@ -4,7 +4,6 @@ using System.Linq;
|
|||
using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Net.Sockets;
|
||||
using Microsoft.AspNetCore.Connections;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Misc
|
||||
|
|
@ -70,16 +69,15 @@ namespace Server.Misc
|
|||
try
|
||||
{
|
||||
NetState ns = e.State;
|
||||
ConnectionContext s = ns.Connection;
|
||||
|
||||
IPEndPoint ipep = (IPEndPoint)s.LocalEndPoint;
|
||||
IPEndPoint ipep = (IPEndPoint)ns.Connection.LocalEndPoint;
|
||||
|
||||
IPAddress localAddress = ipep.Address;
|
||||
int localPort = ipep.Port;
|
||||
|
||||
if (IsPrivateNetwork(localAddress))
|
||||
{
|
||||
ipep = (IPEndPoint)s.RemoteEndPoint;
|
||||
ipep = (IPEndPoint)ns.Connection.RemoteEndPoint;
|
||||
if (!IsPrivateNetwork(ipep.Address) && m_PublicAddress != null)
|
||||
localAddress = m_PublicAddress;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue