Fiddler
The free web debugging proxy for any browser, system or platform.
Inspect HTTP requests from Android devices
안드로이드에에서 HttpClient 사용시 Wiki Setting에 Proxy서버 연동을 선택했지만 그래도 정상적으로 Fiddler에 캡쳐되지 않을 경우 아래와 같은 방법을 사용할 수 있다.
Sometimes it is necessary to have a detailed view on the HTTP requests sent by your Android app and also inspect the responses from the server. With a few steps, it is quite easily possible to do this:
- Connect your Android device and your PC with the same network, e.g. by connecting the PC to the same Wifi.
- On the PC, install Fiddler.
- Make sure, Fiddler is configured to allow remote computers to connect:
- If you want, you can user Fiddler also to capture HTTPS traffic:
- In your Android app you have to set your PC as proxy server for the HTTP traffic. To do this, you have to provide the proxy information to the HttpClient by setting a HttpHost instance pointing to your PC’s IP address and the port Fiddler is listening at as proxy in the Http parameters:
HttpParams httpParameters = new BasicHttpParams();
HttpHost proxy = new HttpHost("<your PC's IP>", 8888); // Proxy server IP & PORT.
httpParameters.setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
// ConnRoutePNames.DEFAULT_PROXY = "http.route.default-proxy";
httpClient = new DefaultHttpClient(httpParameters);
Now let Fiddler run on your PC and capture the traffic. Compile your Android app and start it on your mobile device. That’s it. Fiddler should now show you what’s going on between your Android app and the servers it is connecting.
HTTP Proxy를 활용한 모바일웹 서버 연동 테스트
- http://blog.naver.com/ensel7/100155588302
- http://conceptdev.blogspot.kr/2009/01/monitoring-iphone-web-traffic-with.html
모바일의 패킷을 감지하기 위해 Proxy를 사용하면 관련 패킷을 FIddler에서 확인할 수 있다.
- Get Fiddler
Download Fiddler and install it on your PC (with Windows 2000 / XP / 2003 / Vista and Microsoft .NET Framework v2.0 or later) - Set-up Fiddler
Start Fiddler then open the Fiddler Options... window
and in the General tab, ensure Allow remote computers to connect is checked.
In the Connections tab, check Act as system proxy on startup and verify what port is set (eg. 8888).
Once you've saved those settings you need to stop and re-start Fiddler. - Ensure Fiddler is 'listening'
Once Fiddler has re-started, verify that the Capture Traffic menuitem is ticked. - Check the 'listening' IP
You need to know your computer's wireless-network IP address to configure the iPhone. This screenshots shows the Command Prompt > ipconfig output: - Set-up iPhone Settings
With the computer IP address and Fiddler port, go to your iPhone's Wifi Settings and scroll down to the HTTP Proxy, choose Manual and input the Fiddler proxy info - 'sniff' away
If everything has been setup right, anything you do in Safari or other internet applications (like, say Microsoft Tag Reader) will be logged in the Fiddler window. - It's extremely useful for testing/debugging - have fun!
See also
- Charles
- Wireshark
- Computer Network
- Postman
- Hetty - 보안 연구를 위한 오픈소스 HTTP 툴킷
- mitmproxy is a popular open-source HTTPS proxy among security researchers. Use it as a CLI, web, or Python API.
- RESTful
- Hoppscotch - PWA가 지원되는 Open source API development ecosystem.
- Insomnia
- Hapi
- HTTP Toolkit - HTTP 디버깅용 오픈소스
- vim-rest-console - vim에서
.rest
파일 다루기.
Favorite site
References
-
Fiddler_web_debugging_proxy.pdf ↩