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:
knaccc
2019-01-30 02:19:15 +00:00
parent b0588a2b11
commit 933e1a7268
@@ -36,8 +36,9 @@ public class TunnelControl implements Runnable {
this.router = router;
tunnelControlTempDir.delete();
tunnelControlTempDir.mkdir();
this.tunnelControlTempDir = tunnelControlTempDir;
this.tunnelControlTempDir.deleteOnExit();
Runtime.getRuntime().addShutdownHook(new Thread(()->this.tunnelControlTempDir.delete()));
}
public interface Tunnel {