/confignet: Display IP even if firewalled (ticket #2133)

This commit is contained in:
zzz
2018-01-10 16:23:25 +00:00
parent cfbcd54ba9
commit ecb8480b5c

View File

@ -41,13 +41,22 @@ public class ConfigNetHelper extends HelperBase {
/** @return host or "unknown" */ /** @return host or "unknown" */
public String getUdpIP() { public String getUdpIP() {
String rv = _context.getProperty(UDPTransport.PROP_IP);
if (rv != null)
return rv;
RouterAddress addr = _context.router().getRouterInfo().getTargetAddress("SSU"); RouterAddress addr = _context.router().getRouterInfo().getTargetAddress("SSU");
if (addr == null) if (addr != null) {
return _t("unknown"); rv = addr.getHost();
String rv = addr.getHost(); if (rv != null)
if (rv == null) return rv;
return _t("unknown"); }
return rv; addr = _context.router().getRouterInfo().getTargetAddress("NTCP");
if (addr != null) {
rv = addr.getHost();
if (rv != null)
return rv;
}
return _t("unknown");
} }
/** /**