mirror of https://github.com/zlatinb/muwire
read i2p.properties from file
parent
fb32690c7c
commit
0b8b489169
|
@ -6,5 +6,5 @@ dependencies {
|
||||||
compile "net.i2p:i2p:${i2pVersion}"
|
compile "net.i2p:i2p:${i2pVersion}"
|
||||||
testCompile 'org.junit.jupiter:junit-jupiter-api:5.4.2'
|
testCompile 'org.junit.jupiter:junit-jupiter-api:5.4.2'
|
||||||
testCompile 'junit:junit:4.12'
|
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()
|
println myDest.toBase64()
|
||||||
}
|
}
|
||||||
|
|
||||||
def props = System.getProperties().clone()
|
Properties props = System.getProperties().clone()
|
||||||
props.putAt("inbound.nickname", "MuWire HostCache")
|
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)
|
session = i2pClient.createSession(new FileInputStream(keyfile), props)
|
||||||
myDest = session.getMyDestination()
|
myDest = session.getMyDestination()
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,12 @@ class UpdateServer {
|
||||||
System.exit(1)
|
System.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
def props = System.getProperties().clone()
|
Properties props = System.getProperties().clone()
|
||||||
props.putAt("inbound.nickname", "MuWire UpdateServer")
|
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)
|
session = i2pClient.createSession(new FileInputStream(keyFile), props)
|
||||||
myDest = session.getMyDestination()
|
myDest = session.getMyDestination()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue