mirror of
https://github.com/wownero/i2p-zero.git
synced 2026-10-17 15:21:40 +02:00
Store server tunnel keys / read tunnel keys from a specified directory when creating a tunnel with tunnelcontrol
Use .i2p-zero in the user's home directory as the i2p config dir.
This commit is contained in:
@@ -20,9 +20,12 @@ public class RouterWrapper {
|
||||
private boolean started = false;
|
||||
private Properties routerProperties;
|
||||
private TunnelControl tunnelControl;
|
||||
private File configDir;
|
||||
|
||||
public RouterWrapper(Properties p) {
|
||||
this.routerProperties = p;
|
||||
configDir = new File(routerProperties.getProperty("i2p.dir.config"));
|
||||
if(!configDir.exists()) configDir.mkdir();
|
||||
}
|
||||
|
||||
public boolean isStarted() {
|
||||
@@ -54,7 +57,7 @@ public class RouterWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
tunnelControl = new TunnelControl(router, new File(new File(routerProperties.getProperty("i2p.dir.config")), "tunnel"));
|
||||
tunnelControl = new TunnelControl(router, new File(configDir, "tunnelTemp"));
|
||||
new Thread(tunnelControl).start();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user