Configuring Fiddler to Capture Web Traffic from an iPhone/iPad Device

As an ArcGIS Server Support Analyst, I often assist customers with web traffic related incidents. While there are many applications available to monitor and capture web traffic from an internet browser, I have found Fiddler (a popular freeware solution) to be invaluable in troubleshooting web applications that fail to display some or all of a web map.

This works fine on Windows machines where Fiddler can be installed and work with the Windows browsers, but what happens if the web application is being accessed from an iPhone or iPad? Fortunately Fiddler provides an option where it can be installed on another machine and configured as a proxy server to capture the web traffic from these types of mobile devices.

NOTE: This configuration assumes there is a Wi-Fi network available for the connecting mobile device. From this Wi-Fi network, the mobile device needs to be able to communicate with the machine that has Fiddler installed.

To configure Fiddler to capture web traffic from iOS devices, just follow these steps.

  1. Open Fiddler. Click Tools, Fiddler Options…
  2. Select the Connections tab. Fiddler listens on port 88888 by default but can be changed here if needed. Make sure the ‘Allow remote computers to connect’ option is checked. It is not checked by default.
  3. Click OK. You will need to close and re-open Fiddler for the changes to take effect.
  4. Once Fiddler is re-opened, make sure it is capturing traffic by clicking on File. The Capture Traffic option should have a checkmark next to it. It will also say ‘Capturing’ at the bottom left corner of the Fiddler window.
  5. Now that Fiddler is ready, we need to configure the mobile device to use Fiddler as a proxy server. The following screen-shots are from an iPad but the same concept can be applied to other mobile devices. On the iPad, tap on the Settings icon from the main screen and tap on Wi-Fi. This will display the Wi-Fi network it is currently connected to. Tap on the arrow next to the active Wi-Fi network (as circled below) to get to the details screen.
  6. At the bottom of the network details screen, tap on the ‘Manual’ button under HTTP Proxy.
  7. Type in the IP address (or hostname) of the machine with Fiddler running and the port number of 8888. This will route all network traffic from the mobile device through Fiddler. Now ArcGIS for iOS can be opened and access to basemaps and map services will be captured.

Jeff S. – Server Usage Support Analyst


This entry was posted in ArcGIS Mobile, ArcGIS Online, export and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

8 Comments

  1. randallwilliams says:

    This is a great blog. I use these steps very often.

  2. mksspam says:

    This is great! How do you set your iphone/ipad to capture traffic on 443? I have the fiddler cert on my phone, but when traffic travels over 443 it get’s munged.

    Thanks!

    • jeff_smith says:

      You should be able to decrypt and view the traffic on 443 by adjusting a setting in Fiddler. Click Tools > Fiddler Options > HTTPS and put a checkmark next to ‘Decrypt HTTPS traffic’. Beyond setting the manual proxy, you shouldn’t need to change anything else on your phone.

  3. arr1711 says:

    Hi Jeff,

    I would like to know how the network setup has to be done.
    1. Connect PC or Mac to wired network–>Create hotspot–>Connect the mobile to the hotspot of PC or Mac and define proxy settings ((proxy : PC or Mac local IP and Port: as defined in Fiddler)?
    2. Connect PC or Mac and mobile to same Wifi network with proxy settings(proxy : PC or Mac local IP and Port: as defined in Fiddler)?

    I tried both ways, but I was unable to capture the traffic

    Am I doing it right?
    Also, is there an alternative way?

    Thanks

    • jeff_smith says:

      Both of those ways should work. The critical thing is that the machine running Fiddler and the mobile device must be on the same network and be able to communicate with each other. For some organizations, the network that a mobile device connects to is separate from the network a PC or Mac connects to.

      In option 1 when you create a hotspot, the hotspot usually has its own subnet. Make sure the proxy IP address you specify in the mobile device is from this new subnet.

      In option 2, make sure the mobile device and the PC or Mac can communicate with each other. If the PC or Mac has a simple web server on it (like IIS), make sure you can access the default home page.

      Also, in both scenarios, make sure the firewall on the PC or Mac is not blocking communication over port 8888.

  4. nicolasgis says:

    FYI, it was not working for me with an ArcGIS Server 10.3.1 and ArcGIS WebAdaptor 10.3.1 (“Could not access any GIS Server machines. Please contact your system administrator “).
    I had to add the following rule to Fiddler to make it work :
    oSession.oRequest.headers.Remove(“Proxy-Connection”)

    • magisnc says:

      Helpful,

      Fiddler–>Rules–>Customize Rules–> I added oSession.oRequest.headers.Remove(“Proxy-Connection”); line to OnBeforeRequest function

      THX nicolasgis

  5. jmccann84 says:

    Great blog!