(Android) CometD Websocket connection is not displayed in Proxyman
gmbett opened this issue · 3 comments
Hello,
I'm working on an Android project that uses CometD library to establish a web socket connection, this library opens a connection like: wss://domain.com:8443/genesys/cometd
I'm currently trying to view the traffic on a real device, and I can properly see all REST requests, so Proxyman certificate is correctly installed on the device, and the network_security_config.xml is configured to trust the certificate.
But, for some reason, I'm unable to see the web socket traffic (I have a paid license).
Am I missing any settings?
I believe that CometD library doesn't use the Proxy for its WS and WSS, so Proxyman can't capture this request.
I suppose that should find a way to set HTTP Proxy to CometD lib. Maybe it's the one: cometd/cometd#744
Hey, sorry for my late reply.
I was able to add the Proxy to the HTTPClient used by the web socket and now I can see indeed the requests on Proxyman
val httpClient = HttpClient().apply {
proxyConfiguration.proxies.add(HttpProxy(PROXY_HOST, PROXY_PORT))
}
val webSocketClient = WebSocketClient(httpClient)
...
Thanks for the hint!
Awesome, glad to know it works 👍