read i2p.properties from file
This commit is contained in:
@ -6,5 +6,5 @@ dependencies {
|
||||
compile "net.i2p:i2p:${i2pVersion}"
|
||||
testCompile 'org.junit.jupiter:junit-jupiter-api:5.4.2'
|
||||
testCompile 'junit:junit:4.12'
|
||||
testCompile 'org.codehaus.groovy:groovy-all:2.4.15'
|
||||
testCompile "org.codehaus.groovy:groovy-all:${groovyVersion}"
|
||||
}
|
||||
|
@ -51,8 +51,13 @@ public class HostCache {
|
||||
println myDest.toBase64()
|
||||
}
|
||||
|
||||
def props = System.getProperties().clone()
|
||||
props.putAt("inbound.nickname", "MuWire HostCache")
|
||||
Properties props = System.getProperties().clone()
|
||||
props["inbound.nickname"] = "MuWire HostCache"
|
||||
|
||||
def i2pPropsFile = new File(home,"i2p.properties")
|
||||
if (i2pPropsFile.exists()) {
|
||||
i2pPropsFile.withInputStream { props.load(it) }
|
||||
}
|
||||
session = i2pClient.createSession(new FileInputStream(keyfile), props)
|
||||
myDest = session.getMyDestination()
|
||||
|
||||
|
@ -42,8 +42,12 @@ class UpdateServer {
|
||||
System.exit(1)
|
||||
}
|
||||
|
||||
def props = System.getProperties().clone()
|
||||
props.putAt("inbound.nickname", "MuWire UpdateServer")
|
||||
Properties props = System.getProperties().clone()
|
||||
props["inbound.nickname"] = "MuWire UpdateServer"
|
||||
def i2pPropsFile = new File(home, "i2p.properties")
|
||||
if (i2pPropsFile.exists()) {
|
||||
i2pPropsFile.withInputStream { props.load(it) }
|
||||
}
|
||||
session = i2pClient.createSession(new FileInputStream(keyFile), props)
|
||||
myDest = session.getMyDestination()
|
||||
|
||||
|
Reference in New Issue
Block a user