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 94dbe0d9c4
commit b0588a2b11

@ -89,6 +89,7 @@ public class TunnelControl implements Runnable {
String seckeyPath = tunnelControlTempDir.getAbsolutePath() + File.separator + "seckey."+uuid+".dat";
Files.write(Path.of(seckeyPath), Base64.decode(keyPair.seckey));
new File(seckeyPath).deleteOnExit(); // clean up temporary file that was only required because new I2PTunnel() requires it to be written to disk
// listen using the I2P server keypair, and forward incoming connections to a destination and port
new Thread(()->{

Loading…
Cancel
Save