forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p' (head 17371fd6f9ef94bbb60a66c6bacb6828d6a4cde5)
to branch 'i2p.i2p.zzz.ipv6' (head 065a076899a2581b4196e626f2b0654c3d39518a)
This commit is contained in:
@ -50,7 +50,12 @@ public class ConfigNetHelper extends HelperBase {
|
||||
return ua.getHost();
|
||||
}
|
||||
|
||||
/**
|
||||
* To reduce confusion caused by NATs, this is the current internal SSU port,
|
||||
* not the external port.
|
||||
*/
|
||||
public String getUdpPort() {
|
||||
/****
|
||||
RouterAddress addr = _context.router().getRouterInfo().getTargetAddress("SSU");
|
||||
if (addr == null)
|
||||
return _("unknown");
|
||||
@ -58,8 +63,17 @@ public class ConfigNetHelper extends HelperBase {
|
||||
if (ua.getPort() <= 0)
|
||||
return _("unknown");
|
||||
return "" + ua.getPort();
|
||||
****/
|
||||
// Since we can't get to UDPTransport.getRequestedPort() from here, just use
|
||||
// configured port. If UDPTransport is changed such that the actual port
|
||||
// could be different, fix this.
|
||||
return getConfiguredUdpPort();
|
||||
}
|
||||
|
||||
/**
|
||||
* This should always be the actual internal SSU port, as UDPTransport udpates
|
||||
* the config when it changes.
|
||||
*/
|
||||
public String getConfiguredUdpPort() {
|
||||
return _context.getProperty(UDPTransport.PROP_INTERNAL_PORT, "unset");
|
||||
}
|
||||
|
Reference in New Issue
Block a user