# Fundamentum Edge Pwfd [![Crates.io][crate-badge]][crate-url] [![License][licence-badge]][licence-url] [![Build Status][build-badge]][build-url] [![Docs.rs][doc-badge]][doc-url] [Website][website-url] | [Docs][doc-url] [crate-badge]: https://img.shields.io/crates/v/fundamentum-edge-pfwd.svg [crate-url]: https://crates.io/crates/fundamentum-edge-pfwd [licence-badge]: https://img.shields.io/badge/license-apache_2.0-blue.svg [licence-url]: https://bitbucket.org/amotus/fundamentum-edge-pfwd/src/master/LICENSE [build-badge]: https://img.shields.io/bitbucket/pipelines/amotus/fundamentum-edge-pfwd/master [build-url]: https://bitbucket.org/amotus/fundamentum-edge-pfwd/pipelines [doc-badge]: https://docs.rs/fundamentum-edge-pfwd/badge.svg [doc-url]: https://docs.rs/fundamentum-edge-pfwd [website-url]: https://www.dimonoff.com/services/fundamentum-iot-platform-paas 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 : ## Usage ```sh 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](doc/development-setup.md). ## License Licensed under Apache License, Version 2.0 [LICENSE](LICENSE).