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.
pull/6/head
knaccc 5 years ago
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 {

Loading…
Cancel
Save