How to Properly Configure node-red setproxy for Secure HTTP Requests?

18 Replies, 1466 Views

---

Hey folks,
So, I’ve been banging my head against the wall trying to figure out how to properly configure node-red setproxy for secure HTTP requests. Like, why is it so cryptic? 😅

I get that node-red setproxy is supposed to make life easier, but man, the docs are kinda vague. I mean, do I just slap the proxy details in the settings.js file and call it a day? Or is there some secret sauce I’m missing?

Also, anyone else run into issues with SSL certs when using node-red setproxy? Feels like it’s either too strict or just ignores everything.

Would love to hear how y’all are handling this. Maybe I’m overcomplicating it, but hey, that’s what forums are for, right?

Cheers! 🍻

---
Hey! I feel your pain with node-red setproxy. It’s definitely not the most straightforward thing to set up. What worked for me was adding the proxy details in the settings.js file under the `httpProxy` and `httpsProxy` sections.

For SSL certs, I had to manually add the CA certs to the node-red environment. There’s a great guide on the Node-RED forum that walks you through it step-by-step. Also, check out the `http-request` node—it’s a lifesaver for secure HTTP requests.

Hope that helps!
Yo, node-red setproxy can be a headache, but once you get it, it’s smooth sailing. I usually just drop the proxy config in settings.js like this:

```
httpProxy: "http://yourproxy:port",
httpsProxy: "https://yourproxy:port"
```

For SSL issues, I use a tool called Fiddler to debug the certs. It’s free and super handy. Also, make sure your proxy server isn’t blocking anything. Sometimes it’s not node-red, it’s the proxy itself.

Good luck!
Man, I struggled with node-red setproxy too! The docs are kinda meh, but I found this awesome blog post that breaks it down: [insert link].

For SSL, I had to set `rejectUnauthorized: false` in the httpRequest node options. Not the most secure, but it got me past the cert errors. If you’re feeling fancy, you can add your certs to the node-red Docker container (if you’re using Docker).

Also, check out Postman for testing your proxy setup before bringing it into node-red.
Hey! node-red setproxy is a bit of a beast, but here’s what I did:

1. Added proxy details to settings.js.
2. Used the `http-proxy-agent` and `https-proxy-agent` npm packages for more control.
3. For SSL, I exported the certs from my browser and added them to node-red’s cert store.

If you’re still stuck, the Node-RED Slack community is super active and helpful. Someone there will definitely have your back.
node-red setproxy is one of those things that’s simple once you know the trick. I just added the proxy config to settings.js and it worked like a charm.

For SSL, I used the `NODE_EXTRA_CA_CERTS` env variable to point to my cert file. Worked like magic!

Also, if you’re testing, try using a free proxy service like https://free-proxy-list.net/ to see if it’s your setup or the proxy itself.
Dude, node-red setproxy is a pain, but it’s doable. I had to tweak my settings.js file and also set up a custom httpRequest node to handle the SSL stuff.

For debugging, I used Charles Proxy—it’s not free, but it’s worth every penny. It lets you see exactly what’s going on with your requests and certs.

Also, double-check your proxy server logs. Sometimes the issue is on their end, not yours.
Hey! I had the same issue with node-red setproxy. The key for me was adding the proxy config to settings.js AND setting the `httpNodeMiddleware` to handle the proxy requests.

For SSL, I used the `node-red-contrib-http-request` node—it has built-in options for handling certs. Also, make sure your proxy server supports HTTPS. Some free proxies don’t, and that’s where the headaches start.

Good luck!
Wow, thanks for all the tips, folks! I tried adding the proxy details to settings.js and it worked like a charm. Still having a bit of trouble with the SSL certs, though. I’ll give the `NODE_EXTRA_CA_CERTS` trick a shot and see if that fixes it.

Also, big shoutout to the Charles Proxy suggestion—I’ll definitely check that out for debugging.

You guys are legends! 🍻
node-red setproxy is tricky, but here’s what worked for me:

- Add proxy details to settings.js.
- Use `http-proxy-middleware` for more control over requests.
- For SSL, I had to add the certs to the node-red Docker container (if you’re using Docker).

Also, check out this GitHub repo: [insert link]. It has a ton of examples for node-red setproxy and SSL configs.

Hope that helps!



Users browsing this thread: 1 Guest(s)