From c96e8968156e0a68957828ae380fe2761ed6500b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=84=9E?= Date: Tue, 23 Jul 2024 15:34:23 +0800 Subject: [PATCH] Update Main.java --- rxlib/src/main/java/org/rx/Main.java | 40 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/rxlib/src/main/java/org/rx/Main.java b/rxlib/src/main/java/org/rx/Main.java index 7aaf1341..2b9092cb 100644 --- a/rxlib/src/main/java/org/rx/Main.java +++ b/rxlib/src/main/java/org/rx/Main.java @@ -335,26 +335,26 @@ static void launchServer(Map options, Integer port, Integer conn final SocksProxyServer proxyServer; void ddns() { - Tasks.schedulePeriod(() -> { - if (conf == null) { - log.warn("conf is null"); - } - - InetAddress wanIp = InetAddress.getByName(IPSearcher.DEFAULT.currentIp()); - for (String ddns : conf.ddnsDomains) { - List currentIps = DnsClient.inlandClient().resolveAll(ddns); - if (currentIps.contains(wanIp)) { - continue; - } - int i = ddns.indexOf("."); - String domain = ddns.substring(i + 1), name = ddns.substring(0, i); - log.info("ddns-{}.{}: {}->{}", name, domain, currentIps, wanIp); - AuthenticProxy p = conf.godaddyProxy != null - ? new AuthenticProxy(Proxy.Type.SOCKS, Sockets.parseEndpoint(conf.godaddyProxy)) - : null; - IPSearcher.godaddyDns(conf.getGodaddyKey(), domain, name, wanIp.getHostAddress(), p); - } - }, conf.ddnsSeconds * 1000L); +// Tasks.schedulePeriod(() -> { +// if (conf == null) { +// log.warn("conf is null"); +// } +// +// InetAddress wanIp = InetAddress.getByName(IPSearcher.DEFAULT.currentIp()); +// for (String ddns : conf.ddnsDomains) { +// List currentIps = DnsClient.inlandClient().resolveAll(ddns); +// if (currentIps.contains(wanIp)) { +// continue; +// } +// int i = ddns.indexOf("."); +// String domain = ddns.substring(i + 1), name = ddns.substring(0, i); +// log.info("ddns-{}.{}: {}->{}", name, domain, currentIps, wanIp); +// AuthenticProxy p = conf.godaddyProxy != null +// ? new AuthenticProxy(Proxy.Type.SOCKS, Sockets.parseEndpoint(conf.godaddyProxy)) +// : null; +// IPSearcher.godaddyDns(conf.getGodaddyKey(), domain, name, wanIp.getHostAddress(), p); +// } +// }, conf.ddnsSeconds * 1000L); } @Override