Skip to content

Expose MQTT proxy configuration#111

Open
ilyar wants to merge 1 commit into
thingsboard:masterfrom
ever-guild:feature/proxy-set
Open

Expose MQTT proxy configuration#111
ilyar wants to merge 1 commit into
thingsboard:masterfrom
ever-guild:feature/proxy-set

Conversation

@ilyar
Copy link
Copy Markdown

@ilyar ilyar commented May 25, 2026

Summary

  • expose proxy_set(...) on TBDeviceMqttClient so callers do not need to access the private _client
  • keep gateway proxy support through TBGatewayMqttClient inheritance
  • add PySocks dependency required by Paho proxy support
  • document proxy configuration with a short example

Context

Fixes #41.

The SDK already uses Paho internally, and Paho supports proxy configuration via Client.proxy_set(...). This PR exposes that capability through the SDK API instead of requiring users to reach into tb_client._client.

Validation

  • python -m py_compile tb_device_mqtt.py setup.py tests/test_mqtt_proxy.py
  • python -m unittest tests.test_mqtt_proxy
  • smoke check with socks.HTTP for both TBDeviceMqttClient and TBGatewayMqttClient

Result: Ran 2 tests in 0.002s - OK

@ilyar ilyar marked this pull request as ready for review May 25, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Communication over proxy not supported

1 participant