Skip to content

Commit

Permalink
Use API domain
Browse files Browse the repository at this point in the history
  • Loading branch information
kaenganxt committed Aug 20, 2022
1 parent 264f15b commit 6979bf1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/csm/Injections/MainMenuHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void CheckForUpdate(bool alwaysShowInfo)
{
try
{
string latest = new CSMWebClient().DownloadString("http://csm-check.kaenganxt.dev/api/version");
string latest = new CSMWebClient().DownloadString("http://api.citiesskylinesmultiplayer.com/api/version");
latest = latest.Substring(1);
string[] versionParts = latest.Split('.');
Version latestVersion = new Version(int.Parse(versionParts[0]), int.Parse(versionParts[1]));
Expand Down
8 changes: 4 additions & 4 deletions src/csm/Networking/IpAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public static string GetLocalIpAddress()
//Create a new socket
using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, 0))
{
//Connect to 8.8.8.8 (Google IP)
socket.Connect("csm-check.kaenganxt.dev", 65530);
//Connect to some server to non-listening port
socket.Connect("api.citiesskylinesmultiplayer.com", 65530);
//Get the IPEndPoint
IPEndPoint endPoint = socket.LocalEndPoint as IPEndPoint;
//Get the IP Address (Internal) from the IPEndPoint
Expand All @@ -63,7 +63,7 @@ public static string GetExternalIpAddress()
try
{
//Get the External IP address from internet
_externalIp = new CSMWebClient().DownloadString("http://csm-check.kaenganxt.dev/api/ip");
_externalIp = new CSMWebClient().DownloadString("http://api.citiesskylinesmultiplayer.com/api/ip");
return _externalIp;
}
catch (Exception e)
Expand All @@ -79,7 +79,7 @@ public static PortState CheckPort(int port)
CSMWebClient client = new CSMWebClient();
try
{
string answer = client.DownloadString("http://csm-check.kaenganxt.dev/api/check?port=" + port);
string answer = client.DownloadString("http://api.citiesskylinesmultiplayer.com/api/check?port=" + port);
return new PortState(answer, client.StatusCode());
}
catch (WebException e)
Expand Down

0 comments on commit 6979bf1

Please sign in to comment.