#edge #fundamentum #daemon #iot

bin+lib fundamentum-edge-pfwd

The port forwarding tool for edge daemon

7 releases

0.2.4 Nov 13, 2024
0.2.3 Nov 5, 2024
0.2.2 Sep 13, 2024
0.2.1 Aug 21, 2024
0.1.0 May 15, 2024

#1462 in Asynchronous

Download history 133/week @ 2024-09-09 55/week @ 2024-09-16 24/week @ 2024-09-23 18/week @ 2024-09-30 22/week @ 2024-10-07 2/week @ 2024-10-14 10/week @ 2024-10-28 154/week @ 2024-11-04 125/week @ 2024-11-11 43/week @ 2024-11-18 14/week @ 2024-11-25 11/week @ 2024-12-02 33/week @ 2024-12-09

106 downloads per month
Used in fundamentum-edge-daemon

Apache-2.0

33KB
602 lines

Fundamentum Edge Pwfd

Crates.io License Build Status Docs.rs

Website | Docs

Port forwarding service for linux edge devices.

This is the device side part of a bidirectional bridge established in between a remote proxy port open in the cloud and its actual target port on the device going through both Kafka and MQTT. This particular component is responsible for the MQTT <=> TARGET_PORT part of the overall bridge. It continuously recovers opaque fragments of an arbitrary protocol initiated cloud side on the PROXY_PORT from an MQTT topic, writing those into the proper local TARGET_PORT. Conversely, it continuously reads opaque protocol fragments from the same local TARGET_PORT channeling those back toward the cloud-side PROXY_PORT through another MQTT channel.

When opening connection, it creates an instance in a tokio task. When forwarding data, it dispatches this data to the right instance. This instance will transfer it to a target socket on the device. The instance will write data read from the socket back to mqtt

Proto rust definition and bindings can be found here : https://crates.io/crates/fundamentum-portforwarding-proto-rust/0.1.0

Usage

cargo run -- --project-id ${project_id} --region-id ${region_id} --registry-id ${registriy_id} --serial ${serial_id} --private-key ${private_key_path}

More --help

Development setup

Please see the development setup guide.

License

Licensed under Apache License, Version 2.0 LICENSE.

Dependencies

~21–33MB
~618K SLoC