lanet 0.3.0 → 0.4.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: a1e22dfda5b58811a99f1d763c3ff32d84b2e8e291ab07b8f1ee90e3c1849446
4
+ data.tar.gz: 70a12c6ea35bd5981acc401f0a7dc482c2f2161c2a67a8b4ffcefc00ac1777a4
5
5
  SHA512:
6
- metadata.gz: db2199bbc4023df5e242152283e6ef3fe458dd06df80b931ebf1daebc3607cad6f73bd58cc1ec0f192b08fc0c467f86c92ecc3e19c07c829bbb41066d2d5ad35
7
- data.tar.gz: e53ef8a5e71aa920f487c0d8437976c78c8102baf41923b069c414512b1b9930a0804cac9e44023668cf0923c80afc71b6c0c7eb82f6f4cfb7d542676f1842bc
6
+ metadata.gz: e45f31e4dacefa4d0622f1fdfe8d8cb48dca0c4ad256481a06f8bf7d1dea2ef231be657db2b8c92c1e129faa8375bdc36221152fb7967cca15ae7bc3c5fce89b
7
+ data.tar.gz: 4cceff6bc76a51aeebb0bc0585ec9228d53151421927e8e8461e39a79f0208ed3a793455f8b9e0714364ce9cb169e987ab757a29e7ad4ab3acc908ab72f8a11f
data/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ 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.4.0] - 2023-11-15
9
+
10
+ ### Added
11
+ - Mesh networking functionality for decentralized communication
12
+ - Auto-discovery of mesh nodes
13
+ - Message routing through intermediate nodes
14
+ - CLI commands for mesh network operations: `mesh start`, `mesh send`, `mesh info`
15
+ - Ruby API methods for creating and managing mesh networks
16
+
8
17
  ## [0.3.0] - 2025-03-08
9
18
 
10
19
  ### 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.4.0)
5
5
  thor (~> 1.2)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -19,6 +19,7 @@ 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
22
23
 
23
24
  ## Security Features
24
25
 
@@ -301,6 +302,38 @@ Receive encrypted files with signature verification:
301
302
  lanet receive-file --output ./downloads --encryption-key "my_secret_key" --public-key-file lanet_public.key
302
303
  ```
303
304
 
305
+ #### Mesh Networking
306
+
307
+ Create a decentralized mesh network where devices can communicate even without direct connectivity:
308
+
309
+ ```bash
310
+ # Start a mesh network node
311
+ lanet mesh start
312
+
313
+ # Start a mesh network node with custom settings
314
+ lanet mesh start --port 5050 --max-hops 15
315
+ ```
316
+
317
+ Send messages through the mesh network:
318
+
319
+ ```bash
320
+ # Send a message through the mesh network to a specific node ID
321
+ lanet mesh send --target a1b2c3d4-5678-90ef-ghij --message "Hello Mesh Network"
322
+
323
+ # Send an encrypted message through the mesh network
324
+ lanet mesh send --target a1b2c3d4-5678-90ef-ghij --message "Secret mesh message" --key "secret-key"
325
+
326
+ # Send a signed message through the mesh network
327
+ lanet mesh send --target a1b2c3d4-5678-90ef-ghij --message "Authenticated mesh message" --private-key-file lanet_private.key
328
+ ```
329
+
330
+ View information about your mesh network:
331
+
332
+ ```bash
333
+ # Display information about mesh network connections
334
+ lanet mesh info
335
+ ```
336
+
304
337
  ### Ruby API
305
338
 
306
339
  You can also use Lanet programmatically in your Ruby applications:
@@ -393,8 +426,42 @@ file_transfer.receive_file('./downloads', 'encryption_key') do |event, data|
393
426
  puts "File saved to: #{data[:file_path]}"
394
427
  end
395
428
  end
429
+
430
+ # Mesh Networking
431
+ mesh = Lanet.mesh_network
432
+ mesh.start # Start the mesh node and discovery service
433
+
434
+ # Send a message through the mesh network
435
+ mesh.send_message(target_node_id, "Hello through the mesh!", "optional-encryption-key")
436
+
437
+ # Get info about mesh connections
438
+ puts "Node ID: #{mesh.node_id}"
439
+ puts "Connected to #{mesh.connections.size} nodes"
440
+ mesh.connections.each do |node_id, info|
441
+ puts " #{node_id} (#{info[:ip]})"
442
+ end
443
+
444
+ # Properly stop the mesh node
445
+ mesh.stop
396
446
  ```
397
447
 
448
+ ## Mesh Network
449
+
450
+ The mesh networking feature provides decentralized communication capabilities:
451
+
452
+ - **Auto-discovery**: Nodes automatically find each other on the network
453
+ - **Multi-hop routing**: Messages can be routed through intermediate nodes
454
+ - **Self-healing**: Adapts to changing network conditions and lost connections
455
+ - **Store and forward**: Messages persist until they can be delivered
456
+ - **End-to-end security**: Messages remain encrypted across multiple hops
457
+ - **Verification**: Digital signatures ensure message integrity through the mesh
458
+
459
+ Ideal for:
460
+ - IoT networks where devices may not have direct connectivity
461
+ - Ad-hoc networks without fixed infrastructure
462
+ - Networks requiring high resilience and redundancy
463
+ - Applications needing peer-to-peer communication
464
+
398
465
  ## Configuration
399
466
 
400
467
  Lanet can be configured with several options: