# MQTT connection over proxy

**URL:** https://discourse.nodered.org/t/mqtt-connection-over-proxy/96442
**Category:** General
**Tags:** mqtt
**Created:** [7 April 2025 06:12 UTC](https://discourse.nodered.org/t/mqtt-connection-over-proxy/96442 "2025-04-07T06:12:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![iALARM](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ialarm/32/97273_2.png) [@iALARM](https://discourse.nodered.org/u/iALARM)
#### Post date: [7 April 2025 06:12 UTC](https://discourse.nodered.org/t/mqtt-connection-over-proxy/96442/1 "2025-04-07T06:12:15Z")

</div>

Hi everone

An HTTP request component has the ability to set a proxy.

However, an MQTT component does not have proxy settings. What is the solution when the MQTT needs to connect to a public MQTT broker through a proxy?

Thank you for your help.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [7 April 2025 06:26 UTC](https://discourse.nodered.org/t/mqtt-connection-over-proxy/96442/2 "2025-04-07T06:26:04Z")

</div>

You can set environment variables http\_proxy / https\_proxy, no\_proxy etc.

See details here: [Perform Proxy logic more like cURL by Steve-Mcl · Pull Request #4616 · node-red/node-red · GitHub](https://github.com/node-red/node-red/pull/4616)

NOTE: this was merged in node-red V4. Prior to v4, I don't think the proxy handling handled MQTT connections correctly.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [6 July 2025 06:26 UTC](https://discourse.nodered.org/t/mqtt-connection-over-proxy/96442/3 "2025-07-06T06:26:36Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
