add ability to change the tunnel name

pull/53/head
Zlatin Balevsky 2020-04-14 13:17:47 +01:00
parent 7a7ebc9690
commit 1d22abfa88
1 changed files with 3 additions and 3 deletions

View File

@ -145,7 +145,7 @@ public class Core {
final SigningPrivateKey spk final SigningPrivateKey spk
public Core(MuWireSettings props, File home, String myVersion) { public Core(MuWireSettings props, File home, String myVersion, String tunnelName = "MuWire") {
this.home = home this.home = home
this.version = myVersion this.version = myVersion
this.muOptions = props this.muOptions = props
@ -165,9 +165,9 @@ public class Core {
i2pOptionsFile.withInputStream { i2pOptions.load(it) } i2pOptionsFile.withInputStream { i2pOptions.load(it) }
if (!i2pOptions.containsKey("inbound.nickname")) if (!i2pOptions.containsKey("inbound.nickname"))
i2pOptions["inbound.nickname"] = "MuWire" i2pOptions["inbound.nickname"] = tunnelName
if (!i2pOptions.containsKey("outbound.nickname")) if (!i2pOptions.containsKey("outbound.nickname"))
i2pOptions["outbound.nickname"] = "MuWire" i2pOptions["outbound.nickname"] = tunnelName
} }
if (!(i2pOptions.hasProperty("i2np.ntcp.port") if (!(i2pOptions.hasProperty("i2np.ntcp.port")
&& i2pOptions.hasProperty("i2np.udp.port") && i2pOptions.hasProperty("i2np.udp.port")