Amazon aws for getting external server IP address.

This commit is contained in:
MobiusDevelopment
2024-01-15 00:13:51 +02:00
parent 36c8b30e92
commit 976c76047c
30 changed files with 60 additions and 60 deletions

View File

@ -4040,7 +4040,7 @@ public class Config
String externalIp = "127.0.0.1";
try
{
final URL autoIp = new URL("http://ip1.dynupdate.no-ip.com:8245/");
final URL autoIp = new URL("http://checkip.amazonaws.com");
try (BufferedReader in = new BufferedReader(new InputStreamReader(autoIp.openStream())))
{
externalIp = in.readLine();
@ -4048,7 +4048,7 @@ public class Config
}
catch (IOException e)
{
LOGGER.log(Level.INFO, "Failed to connect to api.externalip.net please check your internet connection using 127.0.0.1!");
LOGGER.log(Level.INFO, "Failed to connect to checkip.amazonaws.com please check your internet connection using 127.0.0.1!");
externalIp = "127.0.0.1";
}