From 4e507d975cf56bbb7d02589588a297e70f1a96a5 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 28 Nov 2018 13:17:35 +0000 Subject: [PATCH] Fix update failures that started happening recently. Root cause is http://checkip.amazonaws.com returns a malformatted and incorrect ip. You need to use https for it to return your actual ip. And that also makes it return the correct format. Also update duckdns API call to use https as well for security. --- DuckDNSClient/src/duckdns.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DuckDNSClient/src/duckdns.java b/DuckDNSClient/src/duckdns.java index 127f657..d8c9261 100644 --- a/DuckDNSClient/src/duckdns.java +++ b/DuckDNSClient/src/duckdns.java @@ -318,7 +318,7 @@ public void actionPerformed(ActionEvent e) { private static String getip() { Document doc = null; -String url = "http://checkip.amazonaws.com"; +String url = "https://checkip.amazonaws.com"; String ip = ""; try { @@ -335,7 +335,7 @@ private static String getip() { } private static String updateDuckDNS(String domain, String token, String ipaddress) { -String url = "http://www.duckdns.org/update?domains=" + domain + "&token=" + token + "&ip=" + ipaddress; +String url = "https://www.duckdns.org/update?domains=" + domain + "&token=" + token + "&ip=" + ipaddress; Document doc = null; String ua = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2"; try {