I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit be08e8f2 authored by jrandom's avatar jrandom Committed by zzz
Browse files

use the env defaults when no i2cp info is specified

parent f9378099
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,18 @@ public class I2PSocketManagerFactory { ...@@ -30,7 +30,18 @@ public class I2PSocketManagerFactory {
* @return the newly created socket manager, or null if there were errors * @return the newly created socket manager, or null if there were errors
*/ */
public static I2PSocketManager createManager() { public static I2PSocketManager createManager() {
return createManager("localhost", 7654, new Properties()); String i2cpHost = System.getProperty(I2PClient.PROP_TCP_HOST, "localhost");
int i2cpPort = 7654;
String i2cpPortStr = System.getProperty(I2PClient.PROP_TCP_PORT);
if (i2cpPortStr != null) {
try {
i2cpPort = Integer.parseInt(i2cpPortStr);
} catch (NumberFormatException nfe) {
// gobble gobble
}
}
return createManager(i2cpHost, i2cpPort, System.getProperties());
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment