@@ -19,6 +19,7 @@ INFO[0000] tunnel channel is waiting for connection destination="127.0.0.1:
19
19
* Resiliency! Then tunnel will never go down if you don't want to:
20
20
* Idle clients do not get disconnected from the ssh server since Mole keeps sending synthetic packets acting as a keep alive mechanism.
21
21
* Auto reconnection to the ssh server if the it is dropped by any reason.
22
+ * Embedded rpc server to retrieve runtime information about one or more instances running on the system.
22
23
23
24
# Table of Contents
24
25
@@ -42,6 +43,7 @@ INFO[0000] tunnel channel is waiting for connection destination="127.0.0.1:
42
43
* [ Leveraging LocalForward from SSH configuration file] ( #leveraging-localforward-from-ssh-configuration-file )
43
44
* [ Leveraging RemoteForward from SSH configuration file] ( #leveraging-remoteforward-from-ssh-configuration-file )
44
45
* [ Create multiple tunnels using a single ssh connection] ( #create-multiple-tunnels-using-a-single-ssh-connection )
46
+ * [ Show logs of any detached mole instance] ( #show-logs-of-any-detached-mole-instance )
45
47
46
48
# Use Cases
47
49
@@ -330,3 +332,79 @@ INFO[0000] tunnel channel is waiting for connection destination="192.168.33
330
332
INFO[0000] tunnel channel is waiting for connection destination=" 192.168.33.11:80" source=" 127.0.0.1:9090"
331
333
` ` `
332
334
335
+ # ## Show logs of any detached mole instance
336
+
337
+ ` ` ` sh
338
+ $ mole start local \
339
+ --detach \
340
+ --source :9090 \
341
+ --source :9091 \
342
+ --destination 192.168.33.11:80 \
343
+ --destination 192.168.33.11:8080 \
344
+ --server example
345
+ INFO[0000] instance identifier is afb046da
346
+ INFO[0000] execute " mole stop afb046da" if you like to stop it at any time
347
+ $ mole show logs --follow afb046da
348
+ time=" 2021-09-17T13:57:10-07:00" level=info msg=" instance identifier is 1879de9f"
349
+ time=" 2021-09-17T13:57:10-07:00" level=debug msg=" generating an empty config struct"
350
+ time=" 2021-09-17T13:57:10-07:00" level=debug msg=" server: [name=127.0.0.01, address=127.0.0.01:22122, user=mole]"
351
+ time=" 2021-09-17T13:57:10-07:00" level=debug msg=" tunnel: [channels:[[source=127.0.0.1:9888, destination=192.168.33.11:80]], server:127.0.0.01:22122]"
352
+ time=" 2021-09-17T13:57:10-07:00" level=debug msg=" connection to the ssh server is established" server=" [name=127.0.0.01, address=127.0.0.01:22122, user=mole]"
353
+ time=" 2021-09-17T13:57:10-07:00" level=info msg=" tunnel channel is waiting for connection" destination=" 192.168.33.11:80" source=" 127.0.0.1:9888"
354
+ time=" 2021-09-17T13:57:10-07:00" level=debug msg=" start sending keep alive packets"
355
+ ` ` `
356
+
357
+ # ## Show the running configuration of all/any mole instance
358
+
359
+ ` ` ` sh
360
+ $ mole start local \
361
+ --detach \
362
+ --rpc \
363
+ --source :9090 \
364
+ --source :9091 \
365
+ --destination 192.168.33.11:80 \
366
+ --destination 192.168.33.11:8080 \
367
+ --server example
368
+ INFO[0000] instance identifier is 2b3d05be
369
+ INFO[0000] execute " mole stop 2b3d05be" if you like to stop it at any time
370
+ $ mole show instances 2b3d05be
371
+ id = " 2b3d05be"
372
+ tunnel-type = " local"
373
+ verbose = false
374
+ insecure = false
375
+ detach = true
376
+ key = " $HOME /.ssh/id_rsa"
377
+ keep-alive-interval = 0
378
+ connection-retries = 3
379
+ wait-and-retry = 3000000000
380
+ ssh-agent = " "
381
+ timeout = 3000000000
382
+ ssh-config = " $HOME /.ssh/config"
383
+ rpc = true
384
+ rpc-address = " 127.0.0.1:49923"
385
+
386
+ [[source]]
387
+ user = " "
388
+ host = " 127.0.0.1"
389
+ port = " 9090"
390
+
391
+ [[source]]
392
+ user = " "
393
+ host = " 127.0.0.1"
394
+ port = " 9092"
395
+
396
+ [[destination]]
397
+ user = " "
398
+ host = " 192.168.33.11"
399
+ port = " 80"
400
+
401
+ [[destination]]
402
+ user = " "
403
+ host = " 192.168.33.11"
404
+ port = " 8080"
405
+
406
+ [server]
407
+ user = " "
408
+ host = " example"
409
+ port = " 22"
410
+ ` ` `
0 commit comments