From 7197e9aa927b3bbed445e8d08020467ec8e05ac0 Mon Sep 17 00:00:00 2001 From: Benjamin Dweck Date: Fri, 23 Oct 2020 12:37:06 +0200 Subject: [PATCH] Updated example and sample config to run mosquitto on 2 ports: 1883 and 8883 --- example/broker-config/mosquitto.conf | 12 ++++++++++-- example/run-broker.sh | 2 +- example/run-subscriber.sh | 2 +- torch.conf | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/example/broker-config/mosquitto.conf b/example/broker-config/mosquitto.conf index 212ee44..af66f5c 100644 --- a/example/broker-config/mosquitto.conf +++ b/example/broker-config/mosquitto.conf @@ -1,7 +1,15 @@ -listener 8883 +websockets_log_level 9 connection_messages true log_type all -websockets_log_level 9 + +listener 1883 +cafile /mosquitto/config/ca.crt +#keyfile /mosquitto/config/mqtt.example.com.key +#certfile /mosquitto/config/mqtt.example.com.crt +require_certificate true +use_identity_as_username true + +listener 8883 cafile /mosquitto/config/ca.crt keyfile /mosquitto/config/mqtt.example.com.key certfile /mosquitto/config/mqtt.example.com.crt diff --git a/example/run-broker.sh b/example/run-broker.sh index 3751f79..1e03161 100755 --- a/example/run-broker.sh +++ b/example/run-broker.sh @@ -1,3 +1,3 @@ #!/usr/bin/bash -docker run -it --rm --user $(echo $UID) --name mosquitto -p 8883:8883 -v $(pwd)/broker-config:/mosquitto/config eclipse-mosquitto +docker run -it --rm --user $(echo $UID) --name mosquitto -p 8883:8883 -p 1883:1883 -v $(pwd)/broker-config:/mosquitto/config eclipse-mosquitto diff --git a/example/run-subscriber.sh b/example/run-subscriber.sh index 410f635..99dd20c 100755 --- a/example/run-subscriber.sh +++ b/example/run-subscriber.sh @@ -1,3 +1,3 @@ #!/usr/bin/bash -mosquitto_sub -L mqtts://mqtt.example.com/it/torch/\+/ssh_onion --cafile subscriber-config/ca.crt --key subscriber-config/subscriber.key --cert subscriber-config/subscriber.crt +mosquitto_sub -L mqtts://mqtt.example.com/torch/\+/onion_url --cafile subscriber-config/ca.crt --key subscriber-config/subscriber.key --cert subscriber-config/subscriber.crt diff --git a/torch.conf b/torch.conf index b70e1f6..70aefbb 100644 --- a/torch.conf +++ b/torch.conf @@ -32,7 +32,7 @@ BrokerPort = 1883 ClientID = my-client # Optional: Topic to be used when publishing connection info (defaults to 'torch/[hostname]/onion_url') -Topic = example/topic +#Topic = example/topic ### Optional: TLS Options #