Changeset ecb8480


Ignore:
Timestamp:
Jan 10, 2018 4:23:25 PM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
50eb93d
Parents:
cfbcd54
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigNetHelper.java

    rcfbcd54 recb8480  
    4242    /** @return host or "unknown" */
    4343    public String getUdpIP() {
     44        String rv = _context.getProperty(UDPTransport.PROP_IP);
     45        if (rv != null)
     46            return rv;
    4447        RouterAddress addr = _context.router().getRouterInfo().getTargetAddress("SSU");
    45         if (addr == null)
    46             return _t("unknown");
    47         String rv = addr.getHost();
    48         if (rv == null)
    49             return _t("unknown");
    50         return rv;
     48        if (addr != null) {
     49            rv = addr.getHost();
     50            if (rv != null)
     51                return rv;
     52        }
     53        addr = _context.router().getRouterInfo().getTargetAddress("NTCP");
     54        if (addr != null) {
     55            rv = addr.getHost();
     56            if (rv != null)
     57                return rv;
     58        }
     59        return _t("unknown");
    5160    }
    5261
Note: See TracChangeset for help on using the changeset viewer.