aws / aws-iot-device-sdk-js

SDK for connecting to AWS IoT from a device using JavaScript/Node.js
Apache License 2.0
965 stars 385 forks source link

How to connect IoT Core from MQTT client behind HTTP Proxy #397

Closed Vishal8523 closed 2 years ago

Vishal8523 commented 2 years ago

I have devices behind HTTP Proxy (Port: 80 / 443 opened). I want to make these devices connect to AWS IoT Core (a MQTT broker) and publish/subscribe MQTT message by using AWS IoT Device SDK.

So how should I do to config IoT Device SDK to use HTTP Proxy ?

jmklix commented 2 years ago

Is this what you are looking for?

  aws.config.update({
        httpOptions: { agent: proxy('http://proxy.example.com:8080') },

Also you might want to take a look at the v2 sdk and how to use proxy with those examples here

Vishal8523 commented 2 years ago

@jmklix : Yes, this is what I was looking for. Is it possible in aws-iot-device-sdk v1 ?

jmklix commented 2 years ago

Sorry, but no this isn't possible with the v1 sdk

github-actions[bot] commented 2 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.