forked from I2P_Developers/i2p.i2p
/confignet: Display IP even if firewalled (ticket #2133)
This commit is contained in:
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user