diff --git a/README.md b/README.md index 7159fb9..b01ca26 100755 --- a/README.md +++ b/README.md @@ -70,32 +70,34 @@ Press Ctrl-C to gracefully shut down the router (or send the SIGINT signal to th ## Tunnel control +Call the `dist/linux/router/bin/tunnel-control.sh` script as follows to create and destroy tunnels: + #### Listen for i2p connections and forward them to the specified host and port. Returns a newly created destination public key. -`dist/linux/router/bin/tunnel-control.sh server.create ` +`tunnel-control.sh server.create ` -#### Close the tunnel listening for connections on the specified port. Returns "OK". +#### Close the tunnel listening for connections on the specified destination public key. Returns "OK". -`dist/linux/router/bin/tunnel-control.sh server.destroy ` +`tunnel-control.sh server.destroy ` #### Create a tunnel that listens for connections on localhost and forwards connections over I2P to the specified destination public key. Returns a newly created localhost port number. -`dist/linux/router/bin/tunnel-control.sh client.create ` +`tunnel-control.sh client.create ` #### Close the tunnel listening for connections on the specified port. Returns "OK". -`dist/linux/router/bin/tunnel-control.sh client.destroy ` +`tunnel-control.sh client.destroy ` #### Create a socks tunnel, listening on the specified port -`dist/linux/router/bin/tunnel-control.sh socks.create ` +`tunnel-control.sh socks.create ` #### Destroy the socks tunnel listening on the specified port -`dist/linux/router/bin/tunnel-control.sh socks.destroy ` +`tunnel-control.sh socks.destroy ` ## Watch the I2P log for messages diff --git a/src/org/getmonero/i2p/zero/Main.java b/src/org/getmonero/i2p/zero/Main.java index 4a1f7c6..f5cbdff 100644 --- a/src/org/getmonero/i2p/zero/Main.java +++ b/src/org/getmonero/i2p/zero/Main.java @@ -29,7 +29,7 @@ public class Main { p.put("router.sharePercentage","80"); // allow default properties to be overridden via command line args, e.g. --i2p.dir.base=/usr/share/i2p - for(String arg : args) { + for(var arg : args) { if(arg.startsWith("--")) { String[] s = arg.split("="); String argName = s[0].substring("--".length()); diff --git a/src/org/getmonero/i2p/zero/TunnelControl.java b/src/org/getmonero/i2p/zero/TunnelControl.java index 978dc01..36f8e21 100644 --- a/src/org/getmonero/i2p/zero/TunnelControl.java +++ b/src/org/getmonero/i2p/zero/TunnelControl.java @@ -33,7 +33,7 @@ public class TunnelControl implements Runnable { // listen for socket connections to the tunnel controller. // listen for the commands on port 30000: // server.create // returns a newly created destination public key, which will listen for i2p connections and forward them to the specified host and port - // server.destroy // closes the tunnel listening for connections on the specified port, and returns OK + // server.destroy // closes the tunnel listening for connections on the specified destination public key, and returns OK // client.create // returns a newly created localhost port number, where connections will be sent over I2P to the destination public key // client.destroy // closes the tunnel listening for connections on the specified port, and returns OK // socks.create // creates a socks proxy listening on the specified port