lanet 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63793d57879f73e9391c3fe104d23d85e6fb67c8eeb2f87c20dcb5aa7166a1d8
4
- data.tar.gz: 90157da24d774e9066f2a4ae7c31df2410bec002724e91a3db16e27cae265728
3
+ metadata.gz: 8c54bf6a4ec7bdeafe5e225e2cbbe34a181c1990254cd2fb1d3b975fbe670451
4
+ data.tar.gz: a3c802ffc1435b5797b32c2083f1512de1ca74309c25387bdf5fa87110c1fa41
5
5
  SHA512:
6
- metadata.gz: db2199bbc4023df5e242152283e6ef3fe458dd06df80b931ebf1daebc3607cad6f73bd58cc1ec0f192b08fc0c467f86c92ecc3e19c07c829bbb41066d2d5ad35
7
- data.tar.gz: e53ef8a5e71aa920f487c0d8437976c78c8102baf41923b069c414512b1b9930a0804cac9e44023668cf0923c80afc71b6c0c7eb82f6f4cfb7d542676f1842bc
6
+ metadata.gz: 54aa773fe7dc3a6699e7d04de688174f656151dd507bfe439c9780a5efa6521dddbc26d7a97e6e4889f5e17d505cbc2e8926567ef9dc0b30b04f171fcdfcb1d9
7
+ data.tar.gz: c564091430f87f22ef93046ceb2c5a28c210610e9fee78e6d87e082a7380440c20547e1b449b34321bfed8c80e1a83d1707f9daa822fd70cbf053384e8827c00
data/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.5.0] - 2025-03-12
9
+
10
+ ### Added
11
+ - Advanced traceroute functionality for network path analysis
12
+ - Multiple protocol support for traceroute: ICMP, UDP, and TCP
13
+ - Load balancing detection in traceroute results
14
+ - CLI command: `traceroute` with protocol selection and customizable parameters
15
+ - Ruby API for programmatic traceroute operations
16
+ - Comprehensive documentation and examples for traceroute feature
17
+
18
+ ## [0.4.0] - 2025-03-10
19
+
20
+ ### Added
21
+ - Mesh networking functionality for decentralized communication
22
+ - Auto-discovery of mesh nodes
23
+ - Message routing through intermediate nodes
24
+ - CLI commands for mesh network operations: `mesh start`, `mesh send`, `mesh info`
25
+ - Ruby API methods for creating and managing mesh networks
26
+
8
27
  ## [0.3.0] - 2025-03-08
9
28
 
10
29
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lanet (0.3.0)
4
+ lanet (0.5.0)
5
5
  thor (~> 1.2)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -19,6 +19,8 @@ A lightweight, powerful LAN communication tool that enables secure message excha
19
19
  - **Configurable:** Adjust port settings, encryption keys, and network scan ranges.
20
20
  - **Digital Signatures**: Ensure message authenticity and integrity
21
21
  - **File Transfers**: Securely send encrypted files over the LAN with progress tracking and integrity verification
22
+ - **Mesh Networking**: Create resilient mesh networks for decentralized communication, enabling messages to be routed through multiple hops without central infrastructure
23
+ - **Advanced Traceroute**: Analyze network paths using multiple protocols (ICMP, UDP, and TCP)
22
24
 
23
25
  ## Security Features
24
26
 
@@ -301,6 +303,68 @@ Receive encrypted files with signature verification:
301
303
  lanet receive-file --output ./downloads --encryption-key "my_secret_key" --public-key-file lanet_public.key
302
304
  ```
303
305
 
306
+ #### Mesh Networking
307
+
308
+ Create a decentralized mesh network where devices can communicate even without direct connectivity:
309
+
310
+ ```bash
311
+ # Start a mesh network node
312
+ lanet mesh start
313
+
314
+ # Start a mesh network node with custom settings
315
+ lanet mesh start --port 5050 --max-hops 15
316
+ ```
317
+
318
+ Send messages through the mesh network:
319
+
320
+ ```bash
321
+ # Send a message through the mesh network to a specific node ID
322
+ lanet mesh send --target a1b2c3d4-5678-90ef-ghij --message "Hello Mesh Network"
323
+
324
+ # Send an encrypted message through the mesh network
325
+ lanet mesh send --target a1b2c3d4-5678-90ef-ghij --message "Secret mesh message" --key "secret-key"
326
+
327
+ # Send a signed message through the mesh network
328
+ lanet mesh send --target a1b2c3d4-5678-90ef-ghij --message "Authenticated mesh message" --private-key-file lanet_private.key
329
+ ```
330
+
331
+ View information about your mesh network:
332
+
333
+ ```bash
334
+ # Display information about mesh network connections
335
+ lanet mesh info
336
+ ```
337
+
338
+ #### Tracing the route to a target host
339
+
340
+ Basic traceroute using UDP (default protocol):
341
+
342
+ ```bash
343
+ # Simple format
344
+ lanet traceroute google.com
345
+
346
+ # Option format
347
+ lanet traceroute --host google.com
348
+ ```
349
+
350
+ Trace using ICMP protocol:
351
+
352
+ ```bash
353
+ lanet traceroute --host google.com --protocol icmp
354
+ ```
355
+
356
+ Trace using TCP protocol:
357
+
358
+ ```bash
359
+ lanet traceroute --host google.com --protocol tcp --max-hops 15
360
+ ```
361
+
362
+ Customize traceroute parameters:
363
+
364
+ ```bash
365
+ lanet traceroute --host github.com --protocol tcp --max-hops 20 --timeout 2 --queries 4
366
+ ```
367
+
304
368
  ### Ruby API
305
369
 
306
370
  You can also use Lanet programmatically in your Ruby applications:
@@ -393,8 +457,53 @@ file_transfer.receive_file('./downloads', 'encryption_key') do |event, data|
393
457
  puts "File saved to: #{data[:file_path]}"
394
458
  end
395
459
  end
460
+
461
+ # Mesh Networking
462
+ mesh = Lanet.mesh_network
463
+ mesh.start # Start the mesh node and discovery service
464
+
465
+ # Send a message through the mesh network
466
+ mesh.send_message(target_node_id, "Hello through the mesh!", "optional-encryption-key")
467
+
468
+ # Get info about mesh connections
469
+ puts "Node ID: #{mesh.node_id}"
470
+ puts "Connected to #{mesh.connections.size} nodes"
471
+ mesh.connections.each do |node_id, info|
472
+ puts " #{node_id} (#{info[:ip]})"
473
+ end
474
+
475
+ # Properly stop the mesh node
476
+ mesh.stop
477
+
478
+ # Trace route to a host with different protocols
479
+ tracer = Lanet.traceroute(protocol: :udp)
480
+ hops = tracer.trace('github.com')
481
+ hops.each do |hop|
482
+ puts "Hop #{hop[:ttl]}: #{hop[:ip]} - Response: #{hop[:avg_time]}ms"
483
+ end
484
+
485
+ # Use TCP protocol with custom parameters
486
+ tcp_tracer = Lanet.traceroute(protocol: :tcp, max_hops: 15, timeout: 2)
487
+ tcp_tracer.trace('google.com')
396
488
  ```
397
489
 
490
+ ## Mesh Network
491
+
492
+ The mesh networking feature provides decentralized communication capabilities:
493
+
494
+ - **Auto-discovery**: Nodes automatically find each other on the network
495
+ - **Multi-hop routing**: Messages can be routed through intermediate nodes
496
+ - **Self-healing**: Adapts to changing network conditions and lost connections
497
+ - **Store and forward**: Messages persist until they can be delivered
498
+ - **End-to-end security**: Messages remain encrypted across multiple hops
499
+ - **Verification**: Digital signatures ensure message integrity through the mesh
500
+
501
+ Ideal for:
502
+ - IoT networks where devices may not have direct connectivity
503
+ - Ad-hoc networks without fixed infrastructure
504
+ - Networks requiring high resilience and redundancy
505
+ - Applications needing peer-to-peer communication
506
+
398
507
  ## Configuration
399
508
 
400
509
  Lanet can be configured with several options: