Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atlantis doesn't capture mqtt WebSocket traffic #159

Open
retyui opened this issue Jan 27, 2025 · 2 comments
Open

Atlantis doesn't capture mqtt WebSocket traffic #159

retyui opened this issue Jan 27, 2025 · 2 comments

Comments

@retyui
Copy link

retyui commented Jan 27, 2025

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
@retyui
Copy link
Author

retyui commented 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");

@NghiaTranUIT
Copy link
Member

@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.

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

No branches or pull requests

2 participants