From 5c2f55698d0f4585f30b1d3fbd4b1299a113ffda Mon Sep 17 00:00:00 2001 From: retgal Date: Mon, 5 Feb 2024 17:14:49 +0100 Subject: [PATCH] Dont rely on waifupnp for obtaining the public ip --- src/main/java/mpo/dayon/assistant/gui/Assistant.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/mpo/dayon/assistant/gui/Assistant.java b/src/main/java/mpo/dayon/assistant/gui/Assistant.java index 83e434a7..99b58470 100644 --- a/src/main/java/mpo/dayon/assistant/gui/Assistant.java +++ b/src/main/java/mpo/dayon/assistant/gui/Assistant.java @@ -257,12 +257,9 @@ public void actionPerformed(ActionEvent ev) { } private void resolvePublicIp() throws IOException { - publicIp = UPnP.getExternalIP(); - if (publicIp == null || publicIp.startsWith("192.168") || publicIp.startsWith("10.")) { - final URL url = new URL(WHATSMYIP_SERVER_URL); - try (final BufferedReader lines = new BufferedReader(new InputStreamReader(url.openStream()))) { - publicIp = lines.readLine(); - } + final URL url = new URL(WHATSMYIP_SERVER_URL); + try (final BufferedReader lines = new BufferedReader(new InputStreamReader(url.openStream()))) { + publicIp = lines.readLine(); } } };