Невозможно использовать прокси-сервер Fiddler с эмулятором Android - PullRequest
1 голос
/ 05 августа 2020

Я хочу захватить весь трафик c с эмулируемого устройства приложением Fiddler на хост-машине. После всех моих попыток я получил бесконечное количество запросов CONNECT с тайм-аутом даже для запросов HTTP (не HTTPS).

Что я сделал:

Android Настройка прокси-сервера эмулятора:

android emulator proxy setup

Fiddler setup:

fiddler options

Added the following lines to the host machine hosts file: 127.0.0.1 local.test and to the Android device hosts file: 10.0.2.2 local.test. This is done to 1) prevent Chrome to force switching to HTTPS 2) point this name to correct IP addresses as it's different on the host machine and on the Android system.

Converted FiddlerRoot certificate from the DER format to PEM (begins with the BEGIN CERTIFICATE line) and stored it to the phone file system: /system/etc/security/cacerts/c8450d0d.0 with correct rights:

root cert on the device

Additions to Android were made using the Google-API image (Android 9) with the writable file system.

This root certificate appears in the system root certificates list:

system root cert list

FiddlerRoot certificate also successfully installed on the host machine and decrypts HTTPS traffic with no problems:

https decryption on host

In the result:

When I turn off proxy in the android emulator, I can access a local app using the custom domain name local.test:3200. I also can access internet sites with no problems.

When I turn on proxy in the android emulator, I see a lot of CONNECT requests that all times out:

CONNECT requests

When I try to access my local HTTP app http://local.test:3200 I receive the HTTPS CONNECT request to the specified port:

CONNECT on 3200

местный на android

Почему пытается подключиться по HTTPS к порту 3200 ??? Эта проблема возникает, только если включен прокси-сервер Android Emulator. Когда он выключен, я могу успешно получить доступ к своей локальной странице по HTTP. Приложение-эмулятор пытается переключиться на HTTPS? Или что я делаю не так?

В настоящее время я не могу захватывать и декодировать трафик c с эмулируемого устройства. Кто-нибудь может мне помочь, пожалуйста?

...