我正在尝试将我的react-native应用程序与aws-iot连接。我正在使用https://github.com/aws/aws-iot-device-sdk-js,它可以在公共网络上使用。但是,当我尝试在公司代理中运行它时,我看到物联网无法兑现该代理,而是尝试直接连接到AWS并被防火墙拒绝。我需要一种方法来告诉连接使用代理。这是我用来连接的代码。非常感谢您的帮助。
this.thingShadowConfig = {
clientId: this.thingName,
host: this.props.config.AWS_IOT_THINGSHADOW.iotHost,
protocol: this.props.config.AWS_IOT_THINGSHADOW.protocol,
accessKeyId: this.props.config.AWS_IOT_THINGSHADOW.accessKeyId,
secretKey: this.props.config.AWS_IOT_THINGSHADOW.secretKey,
will: {
topic: `Disconnected`,
payload: JSON.stringify(disconnectMessage),
qos: 1
}
};
this.awsThingShadowClient = awsIot.thingShadow(this.thingShadowConfig);