mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-03-15 06:41:21 +00:00
- NioTSO client isn't needed because we're using RayLib - Added FreeSO's API server to handle most backend operations
21 lines
509 B
C#
Executable file
21 lines
509 B
C#
Executable file
using System.Net;
|
|
|
|
namespace FSO.Server.Common
|
|
{
|
|
public class IPAddress
|
|
{
|
|
public static string Get(HttpListenerRequest httpRequest)
|
|
{
|
|
if (httpRequest.Headers["X-Forwarded-For"] != null)
|
|
{
|
|
return httpRequest.Headers["X-Forwarded-For"];
|
|
}
|
|
return Get(httpRequest.RemoteEndPoint);
|
|
}
|
|
|
|
public static string Get(IPEndPoint endpoint)
|
|
{
|
|
return endpoint.Address.ToString();
|
|
}
|
|
}
|
|
}
|