[GH-ISSUE #159] Atlantis doesn't capture mqtt WebSocket traffic #97

Closed
opened 2026-03-03 19:11:46 +03:00 by kerem · 2 comments
Owner

Originally created by @retyui on GitHub (Jan 27, 2025).
Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/159

I passed shouldCaptureWebSocketTraffic:YES

 [Atlantis startWithHostName:@"192.168.100.46" shouldCaptureWebSocketTraffic:YES];

Here the code that create mqtt connection

#include <mqtt/async_client.h>

// ...

mqttClient = make_shared<::mqtt::async_client>(uri, clientId, opt); // uri: `wss://avusnlsslh8sx-ats.iot.us-west-2.amazonaws.com`

connOpts = ::mqtt::connect_options::v5_ws();
connOpts.set_http_headers(std::move(headers)); // aws headers

::mqtt::ssl_options sslOpt;
sslOpt.set_enable_server_cert_auth(false);
connOpts.set_ssl(std::move(sslOpt));

mqttClient->connect(connOpts, nullptr, *this);
Image
Originally created by @retyui on GitHub (Jan 27, 2025). Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/159 I passed `shouldCaptureWebSocketTraffic:YES` ```cpp [Atlantis startWithHostName:@"192.168.100.46" shouldCaptureWebSocketTraffic:YES]; ``` Here the code that create mqtt connection ```cpp #include <mqtt/async_client.h> // ... mqttClient = make_shared<::mqtt::async_client>(uri, clientId, opt); // uri: `wss://avusnlsslh8sx-ats.iot.us-west-2.amazonaws.com` connOpts = ::mqtt::connect_options::v5_ws(); connOpts.set_http_headers(std::move(headers)); // aws headers ::mqtt::ssl_options sslOpt; sslOpt.set_enable_server_cert_auth(false); connOpts.set_ssl(std::move(sslOpt)); mqttClient->connect(connOpts, nullptr, *this); ``` <img width="1147" alt="Image" src="https://github.com/user-attachments/assets/54750bec-b1ac-475c-aacb-802faa599a43" />
kerem closed this issue 2026-03-03 19:11:46 +03:00
Author
Owner

@retyui commented on GitHub (Jan 27, 2025):

I also tried to add proxy manually, didn't help :(

        connOpts = ::mqtt::connect_options::v5_ws();
        connOpts.set_http_proxy("http://192.168.100.46:9090");
        connOpts.set_https_proxy("http://192.168.100.46:9090");
<!-- gh-comment-id:2616514757 --> @retyui commented on GitHub (Jan 27, 2025): I also tried to add proxy manually, didn't help :( ```cpp connOpts = ::mqtt::connect_options::v5_ws(); connOpts.set_http_proxy("http://192.168.100.46:9090"); connOpts.set_https_proxy("http://192.168.100.46:9090"); ```
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 28, 2025):

@retyui Atlantis can only capture websocket if it's called by using URLSessionWebSocketTask.

Atlantis can't work with mqtt.

I suggest using a normal proxy with Proxyman (not using Atlantis) and setting an HTTP(S) Proxy to Proxyman as you've already done.

<!-- gh-comment-id:2617572237 --> @NghiaTranUIT commented on GitHub (Jan 28, 2025): @retyui Atlantis can only capture websocket if it's called by using [URLSessionWebSocketTask](https://developer.apple.com/documentation/foundation/urlsessionwebsockettask). Atlantis can't work with `mqtt`. I suggest using a normal proxy with Proxyman (not using Atlantis) and setting an HTTP(S) Proxy to Proxyman as you've already done. - Follow this doc for [iOS device](https://docs.proxyman.com/debug-devices/ios-device), or [iOS Simulator](https://docs.proxyman.com/debug-devices/ios-simulator)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/atlantis#97
No description provided.