propagate from branch 'i2p.i2p' (head 17371fd6f9ef94bbb60a66c6bacb6828d6a4cde5)

to branch 'i2p.i2p.zzz.ipv6' (head 065a076899a2581b4196e626f2b0654c3d39518a)
This commit is contained in:
zzz
2013-05-06 11:27:10 +00:00
9 changed files with 131 additions and 88 deletions

View File

@ -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");
}