https://github.com/alejomalia/leccfirewall
LeccFirewall is an advanced communication management system that leverages the LECC framework to maintain connectivity in critical scenarios. It dynamically scans available protocols, prioritizes them based on user-defined roles, and reroutes data through fallback options when primary connections fail.
https://github.com/alejomalia/leccfirewall
communication-protocol framework http i2c iart iot lecc maskpert mqtt multi-protocol-support protocol python tcp udp
Last synced: 3 months ago
JSON representation
LeccFirewall is an advanced communication management system that leverages the LECC framework to maintain connectivity in critical scenarios. It dynamically scans available protocols, prioritizes them based on user-defined roles, and reroutes data through fallback options when primary connections fail.
- Host: GitHub
- URL: https://github.com/alejomalia/leccfirewall
- Owner: AlejoMalia
- License: gpl-3.0
- Created: 2025-02-27T23:42:46.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-28T01:33:05.000Z (3 months ago)
- Last Synced: 2025-02-28T08:21:46.244Z (3 months ago)
- Topics: communication-protocol, framework, http, i2c, iart, iot, lecc, maskpert, mqtt, multi-protocol-support, protocol, python, tcp, udp
- Language: Python
- Homepage:
- Size: 41 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
LECCFirewall
========================
A dynamic communication firewall built on the *LECC framework* to ensure uninterrupted connectivity. **LeccFirewall** is an advanced communication management system that leverages the [LECC framework](https://github.com/AlejoMalia/lecc) to maintain connectivity in critical scenarios. It dynamically scans available protocols, prioritizes them based on user-defined roles, and reroutes data through fallback options when primary connections fail.
 
Features
--------* ๐ **Multi-Protocol Support:** Works with HTTP, TCP, UDP, MQTT, UART, Bluetooth, and more.
* ๐งฉ **Dynamic Adaptation:** Automatically switches to available protocols during failures.
* ๐ **Priority-Based Routing:** Ensures critical systems (e.g., payment terminals) stay online.
* ๐บ **Real-Time Monitoring:** Continuously checks and updates connection status.Installation
------------1. Clone the repository:
git clone https://github.com/AlejoMalia/LeccFirewall.git
cd LeccFirewall
2. Install dependencies:
pip install -r requirements.txt
3. Run the firewall:
python leccfirewall.py
Use Cases
---------### 1\. Hospital Critical Systems
โ ๏ธ **Problem:** Internet cuts interrupt patient monitors.
๐งช **Solution:** LeccFirewall switches MQTT sensor data to UART or TCP over a local network, keeping doctors informed.
๐ **Outcome:** Continuous patient monitoring despite network issues.
### 2\. Smart City Traffic Management
โ ๏ธ **Problem:** Network failure stops traffic light coordination.
๐งช **Solution:** LeccFirewall uses UDP or Ethernet backups to maintain local control until the main network recovers.
๐ **Outcome:** Traffic flows smoothly during outages.
Configuration
-------------Edit `leccfirewall.py` to define your system's roles and priorities:
self.device_roles = {
"http": "critical", # Payment terminals
"udp": "secondary", # Local network backup
"tcp": "secondary" # Server
}
self.priority_rules = {
"critical": ["HTTP", "UDP", "TCP"],
"secondary": ["TCP", "UDP"]
}Dependencies
------------Listed in `requirements.txt`:
requests
paho-mqtt
smbus2
flaskContributing
------------Feel free to fork this repository, submit pull requests, or open issues for suggestions!
License
-------This project is open-source under the MIT License.
Credits
-------| | Name | Role | GitHub |
| ---------------------------------------------------------------------------------- | ----------- | ------------ | ---------------------------------------------- |
|  | Alejo | Author & Development | [@alejomalia](https://github.com/alejomalia) |[](https://twitter.com/alejomalia_) [](https://www.instagram.com/alejomalia/)
*Developed with assistance from Grok3, created by xAI.*