mirror of
https://github.com/wownero/i2p-zero.git
synced 2026-10-19 16:18:33 +02:00
all.destroy command to remove all tunnels
This commit is contained in:
@@ -119,6 +119,10 @@ specified host and port. Returns the I2P b32 destination address for the server
|
||||
|
||||
`tunnel-control.sh socks.destroy <local port>`
|
||||
|
||||
#### Destroy all tunnels. Returns "OK"
|
||||
|
||||
`tunnel-control.sh all.destroy`
|
||||
|
||||
#### Start a SAM listener on port 7656. Returns "OK"
|
||||
|
||||
`tunnel-control.sh sam.create`
|
||||
|
||||
@@ -374,6 +374,15 @@ public class TunnelControl implements Runnable {
|
||||
break;
|
||||
}
|
||||
|
||||
case "all.destroy": {
|
||||
tunnelList.getTunnelsCopyStream().forEach(t -> {
|
||||
t.destroy();
|
||||
tunnelList.removeTunnel(t);
|
||||
});
|
||||
out.println("OK");
|
||||
break;
|
||||
}
|
||||
|
||||
case "sam.create": {
|
||||
String[] samArgs = new String[]{"sam.keys", "127.0.0.1", "7656", "i2cp.tcp.host=127.0.0.1", "i2cp.tcp.port=7654"};
|
||||
I2PAppContext context = router.getContext();
|
||||
|
||||
Reference in New Issue
Block a user