I would like to capture TLS handshakes coming from Android. I was able to install a certificate using this instruction, then I started a server:

openssl s_server -key my_site.key -cert my_site.crt -msg

and I set a proxy in the Android Emulator:

but if I browse to any pages on the Android device, I get this result:


and this result in OpenSSL:

<<< ??? [length 0005]
    43 4f 4e 4e 45
24500:error:1408F09B:SSL routines:ssl3_get_record:https proxy request:../
shutting down SSL

What am I doing wrong?

  • connection refused means that on TCL level the connection could not be established. Make sure that the proxy and the server are really accessible on TCP level. BTW: If you just want to capture the TLS handshake why don't you just use Wireshark to capture it instead of trying to intercept all connections? Also in my opinion openssl s_server may be the wrong tool. I don't think it is able to handle multiple request concurrently. May be that causes the connection refused message (server is busy with first request and the other are rejected on TCP level)?
    – Robert
    Commented Dec 9, 2021 at 8:08
  • Last but not least using a proxy is a bad idea because then you don't capture the TLS server connection but the proxy connection. So you don't get the correct handshake.
    – Robert
    Commented Dec 9, 2021 at 8:12
  • If you don't need the TLS handshake why do you use it as the title of your question!? What you want are the HTTP request headers.
    – Robert
    Commented Dec 9, 2021 at 14:15

1 Answer 1


I ended up writing my own proxy to solve this [1], inspired by another project [2].

To capture TLS handshake, go to Android Chrome App info, then Storage, then MANAGE SPACE, then CLEAR ALL DATA, then OK. Then start the server, and go to Android Emulator Extended Controls. Choose Manual proxy configuration, then enter:

and click Apply. Then start Android Chrome.

  1. https://github.com/89z/rosso/tree/v1.47.3/cmd/proxy
  2. https://github.com/spritesprite/proxychannel

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .