diff --git a/Program.cs b/Program.cs index 538bafb..30cd8f1 100644 --- a/Program.cs +++ b/Program.cs @@ -23,7 +23,6 @@ async Task RunMqttServer(string[] args) // .WriteTo.File(new RenderedCompactJsonFormatter(), "log.json", rollingInterval: RollingInterval.Hour) .CreateLogger(); - // Create and configure MQTT server using var mqttServer = new MqttServerFactory() .CreateMqttServer(BuildMqttServerOptions()); ConfigureMqttServer(mqttServer); @@ -33,7 +32,6 @@ async Task RunMqttServer(string[] args) await host.StartAsync(); var lifetime = host.Services.GetRequiredService(); - // Start MQTT server await mqttServer.StartAsync(); // Configure graceful shutdown diff --git a/README.md b/README.md index 835e97b..e79ad8a 100644 --- a/README.md +++ b/README.md @@ -62,9 +62,18 @@ services: ## Configuration Options +- **Certificate**: Mount your PFX certificate file to `/app/certificate.pfx` in the container or preferably modify it in the parent folder after git cloning. +- **Ports**: The application uses 8883 for SSL MQTT (default). -- **Certificate**: Mount your PFX certificate file to `/app/certificate.pfx` in the container -- **Ports**: The application uses 8883 for SSL MQTT (default) and port 1883 for standard MQTT +## Ideas for MQTT mesh moderation + +- Rate-limiting a packet we've heard before +- Rate-limiting packets per node +- "Zero hopping" certain packets +- Blocking unknown topics or undecryptable packets (from unknown channels) +- Blocking or rate-limiting certain portnums +- Fail2ban style connection moderation +- Banning of known bad actors list ## Troubleshooting