mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-08 18:21:18 +08:00
change mosquitto protocol from mqtts to wss
This commit is contained in:
@@ -212,7 +212,7 @@ func setupMQTTSingleton(cfg *config.ClientConfig) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not read secrets file %w", err)
|
||||
}
|
||||
opts.AddBroker("mqtts://" + server + ":" + port)
|
||||
opts.AddBroker("wss://" + server + ":" + port)
|
||||
opts.SetUsername(cfg.Node.ID)
|
||||
opts.SetPassword(string(pass))
|
||||
mqclient = mqtt.NewClient(opts)
|
||||
@@ -239,7 +239,7 @@ func setupMQTT(cfg *config.ClientConfig) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not read secrets file %w", err)
|
||||
}
|
||||
opts.AddBroker(fmt.Sprintf("mqtts://%s:%s", server, port))
|
||||
opts.AddBroker(fmt.Sprintf("wss://%s:%s", server, port))
|
||||
opts.SetUsername(cfg.Node.ID)
|
||||
opts.SetPassword(string(pass))
|
||||
opts.SetClientID(ncutils.MakeRandomString(23))
|
||||
|
Reference in New Issue
Block a user