forked from I2P_Developers/i2p.i2p
2005-07-20 jrandom
* Allow the user to specify an external port # for SSU even if the external host isn't specified (thanks duck!)
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
$Id: history.txt,v 1.213 2005/07/16 07:52:36 cervantes Exp $
|
$Id: history.txt,v 1.214 2005/07/19 16:00:25 jrandom Exp $
|
||||||
|
|
||||||
|
2005-07-20 jrandom
|
||||||
|
* Allow the user to specify an external port # for SSU even if the external
|
||||||
|
host isn't specified (thanks duck!)
|
||||||
|
|
||||||
2005-07-19 jrandom
|
2005-07-19 jrandom
|
||||||
* Further preparation for removing I2CP crypto
|
* Further preparation for removing I2CP crypto
|
||||||
|
@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RouterVersion {
|
public class RouterVersion {
|
||||||
public final static String ID = "$Revision: 1.204 $ $Date: 2005/07/16 07:52:36 $";
|
public final static String ID = "$Revision: 1.205 $ $Date: 2005/07/19 16:00:26 $";
|
||||||
public final static String VERSION = "0.5.0.7";
|
public final static String VERSION = "0.5.0.7";
|
||||||
public final static long BUILD = 16;
|
public final static long BUILD = 17;
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
System.out.println("I2P Router version: " + VERSION);
|
System.out.println("I2P Router version: " + VERSION);
|
||||||
System.out.println("Router ID: " + RouterVersion.ID);
|
System.out.println("Router ID: " + RouterVersion.ID);
|
||||||
|
@@ -483,16 +483,23 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
|||||||
}
|
}
|
||||||
|
|
||||||
void rebuildExternalAddress() {
|
void rebuildExternalAddress() {
|
||||||
|
// if the external port is specified, we want to use that to bind to even
|
||||||
|
// if we don't know the external host.
|
||||||
|
String port = _context.getProperty(PROP_EXTERNAL_PORT);
|
||||||
|
if (port != null) {
|
||||||
|
try {
|
||||||
|
_externalListenPort = Integer.parseInt(port);
|
||||||
|
} catch (NumberFormatException nfe) {
|
||||||
|
_externalListenPort = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (explicitAddressSpecified()) {
|
if (explicitAddressSpecified()) {
|
||||||
try {
|
try {
|
||||||
String host = _context.getProperty(PROP_EXTERNAL_HOST);
|
String host = _context.getProperty(PROP_EXTERNAL_HOST);
|
||||||
String port = _context.getProperty(PROP_EXTERNAL_PORT);
|
|
||||||
_externalListenHost = InetAddress.getByName(host);
|
_externalListenHost = InetAddress.getByName(host);
|
||||||
_externalListenPort = Integer.parseInt(port);
|
|
||||||
} catch (UnknownHostException uhe) {
|
} catch (UnknownHostException uhe) {
|
||||||
_externalListenHost = null;
|
_externalListenHost = null;
|
||||||
} catch (NumberFormatException nfe) {
|
|
||||||
_externalListenPort = -1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user