https with android and wiremock standalone

395 views
Skip to first unread message

Jerzy Piotr Nowakowski

unread,
Mar 10, 2017, 7:28:10 AM3/10/17
to wiremock-user
Hi,

How can I decode, record and replay the traffic from Android device using wiremock standalone for https case?

This is my command:

java -jar /wiremock-standalone-2.5.1.jar
--root-dir /wiremock
--port 8889
--enable-browser-proxying
--verbose
--https-port 9000
--https-keystore ./identity.jks
--print-all-network-traffic

The device proxy http port is set to 8889. There is no https proxy option.

So currently I can record / replay only the http traffic, not https
Should I install *.jks certificate on android as well? jks file was created using these tips https://gist.github.com/mobmad/433ba54e9cb97d6d7771

Thanks,

Tom Akehurst

unread,
Mar 10, 2017, 9:55:54 AM3/10/17
to wiremock-user
You'll need to use the --proxy-all parameter if it's for HTTPS. Forward proxying currently can't do MITM decryption.

abha gupta

unread,
Mar 10, 2017, 10:31:38 AM3/10/17
to wiremock-user
If you are not bound to use the standalone wiremock instance, you can use https://medium.com/walmartlabs/android-testing-with-mocking-fcec5b9f71c2#.t8zvaiudv to get it working.

urive...@gmail.com

unread,
May 9, 2017, 1:35:52 AM5/9/17
to wiremock-user
I'm also trying to get an HTTPS StandAlone WireMock instance running on a remote server to leverage stub data for both Android and iOS.  Is it possible to run a HTTPS standalone? or is it just record that doesn't work? 



On Friday, March 10, 2017 at 4:28:10 AM UTC-8, Jerzy Piotr Nowakowski wrote:

Tom Akehurst

unread,
May 9, 2017, 4:48:47 PM5/9/17
to wiremock-user
HTTPS works in all cases other than forward proxying. What's not working as expected for you?
Reply all
Reply to author
Forward
0 new messages