1

Fiddler is not capturing network traffic of WSA. I want to set proxy in WSA so I can capture network traffic in fiddler, also before setting proxy in WSA, I also need to install Telerik Fiddler Certificate in WSA, how can I do this?

  • I tried enabling Advanced Networking option in WSA but it didn't worked and network stopped working in WSA
  • I also googled for how can I set proxy using adb but did not find anything
bakar.git
  • 13
  • 3
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Dec 07 '22 at 11:51
  • See the commands at https://gist.github.com/rlaphoenix/f8552a16fcd961a133583105710bfb68 for how to add a proxy root CA certificate as system certificate to WSA. – Robert Dec 22 '22 at 08:41

1 Answers1

0

In Windows PowerShell, enter:

ifconfig

And note the IPV4 Address of the first Ethernet adapter vEthernet: Ethernet adapter vEthernet

Go to Fiddler in Tools > Options > Connections and note the port on which it listens to (usually 8888)

To add the proxy to the settings via adb

First enable the Developer mode in WSA Advanced settings.

Then you can connect to the WSA using adb (assuming you have adb installed):

adb connect 127.0.0.1:58526

Finally run those commands to configure the proxy:

adb shell settings put global http_proxy XXX.XXX.XXX.XXX:8888
adb shell settings put global global_http_proxy_host XXX.XXX.XXX.XXX
adb shell settings put global global_http_proxy_port 8888
adb shell reboot

with XXX.XXX.XXX.XXX being the IPV4 Address you previously noted.

To remove the proxy, just run those commands:

adb shell settings delete global http_proxy
adb shell settings delete global global_http_proxy_host
adb shell settings delete global global_http_proxy_port
adb shell reboot

To add the proxy in the Android settings menu

You can also configure the proxy in the settings menu. You still need adb however, as I didn't find any other way to open WSA android settings other than running:

adb shell am start -n com.android.settings/.Settings

There you can open Network & internet > Internet > VirtWifi. Modify it, the interface of the popup is a bit buggy on my side; you might have to navigate through the fields with the TAB key.

Set Proxy to Manual, Proxy hostname to the IPV4 Address, and Proxy port to the Fiddler port.

Don't forget to hit save after that.

NB: Since we are in the Android settings, we can also set the CA Certificate of Fiddler to sniff HTTPS packet. For that, you can follow this tutorial

Dj0ulo
  • 440
  • 4
  • 9