samples: net: mqtt: update readme with SOCKS5 info
This commits adds an overlay file with the SOCKS5 symbol that is needed to run MQTT with a proxy, and extends README with instructions on how to use it with the default and custom settings. Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This commit is contained in:
parent
3aa8443ab4
commit
9115386e4d
|
@ -122,6 +122,31 @@ specifying ``-DOVERLAY_CONFIG=overlay-tls-offload.conf`` when running cmake.
|
|||
|
||||
Using this overlay enables TLS without bringing in mbedtls.
|
||||
|
||||
SOCKS5 proxy support
|
||||
====================
|
||||
|
||||
It is also possible to connect to the MQTT broker through a SOCKS5 proxy.
|
||||
To enable it, use ``-DOVERLAY_CONFIG=overlay-socks5.conf`` when running cmake.
|
||||
|
||||
By default, to make the testing easier, the proxy is expected to run on the
|
||||
same host as the MQTT broker.
|
||||
|
||||
To start a proxy server, ``ssh`` can be used.
|
||||
Use the following command to run it on your host with the default port:
|
||||
|
||||
.. code-block: console
|
||||
|
||||
$ ssh -N -D 0.0.0.0:1080 localhost
|
||||
|
||||
To connect to a proxy server that is not running under the same IP as the MQTT
|
||||
broker or uses a different port number, modify the following values:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#define SOCKS5_PROXY_ADDR SERVER_ADDR
|
||||
#define SOCKS5_PROXY_PORT 1080
|
||||
|
||||
|
||||
Running on cc3220sf_launchxl
|
||||
============================
|
||||
|
||||
|
|
1
samples/net/mqtt_publisher/overlay-socks5.conf
Normal file
1
samples/net/mqtt_publisher/overlay-socks5.conf
Normal file
|
@ -0,0 +1 @@
|
|||
CONFIG_MQTT_LIB_SOCKS=y
|
Loading…
Reference in a new issue