1
0
forked from iarv/mqtt
This commit is contained in:
Ben Meadors
2025-04-17 18:50:59 -05:00
parent 1131f6bce9
commit f95df1069b
2 changed files with 11 additions and 4 deletions

View File

@@ -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<IHostApplicationLifetime>();
// Start MQTT server
await mqttServer.StartAsync();
// Configure graceful shutdown

View File

@@ -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