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

(Android) CometD Websocket connection is not displayed in Proxyman #2000

Closed
gmbett opened this issue Apr 18, 2024 · 3 comments
Closed

(Android) CometD Websocket connection is not displayed in Proxyman #2000

gmbett opened this issue Apr 18, 2024 · 3 comments
Labels
✅ Done Ticket is addressed and fixed. question Further information is requested

Comments

@gmbett
Copy link

gmbett commented Apr 18, 2024

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?

@gmbett gmbett added the question Further information is requested label Apr 18, 2024
@NghiaTranUIT
Copy link
Member

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

@gmbett
Copy link
Author

gmbett commented Apr 23, 2024

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!

@gmbett gmbett closed this as completed Apr 23, 2024
@NghiaTranUIT
Copy link
Member

Awesome, glad to know it works 👍

@NghiaTranUIT NghiaTranUIT added the ✅ Done Ticket is addressed and fixed. label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Done Ticket is addressed and fixed. question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants