gitmyhub

AndroidHttpCapture

Java ★ 4.6k updated 1mo ago

AndroidHttpCapture网络诊断工具 是一款Android手机抓包软件 主要功能包括:手机端抓包、PING/DNS/TraceRoute诊断、抓包HAR数据上传分享。你也可以看成是Android版的"Fiddler" \(^o^)/~

An Android app that intercepts and records all HTTP and HTTPS network traffic on your device so you can inspect request headers, response bodies, and JSON data for debugging and testing.

JavaAndroidNettybrowsermob-proxysetup: moderatecomplexity 2/5

AndroidHttpCapture is an Android app that records all the network requests your phone makes, letting you see exactly what data is being sent and received. Think of it as a window into your phone's internet traffic. The project description calls it the Android equivalent of Fiddler, which is a well-known tool desktop developers use to inspect web traffic.

The main feature is HTTP and HTTPS capture. When you browse a page through the app, every request the page makes gets recorded: the headers, cookies, and body of both the request going out and the response coming back. If the response is JSON data, the app formats it to make it readable. You can filter and search through captured traffic, and export it all as a HAR file, which is a standard format that other analysis tools can open.

Beyond basic capture, the app includes a few other tools. You can modify responses on the fly to test how an app behaves when it receives different data. You can configure custom host entries, which is useful for pointing a domain at a different server during testing. There are network diagnostic tools for DNS lookups, ping, and traceroute. The app also shows console log output from web pages loaded inside it, which helps when debugging hybrid apps that mix web content with native Android code.

Setting up HTTPS capture requires installing a certificate on your device, the same approach Fiddler uses on desktop. Without the certificate, HTTPS traffic cannot be read. Newer Android versions may require you to install the certificate manually through the security settings.

The app is built on top of two open-source libraries: Netty, a networking framework, and browsermob-proxy, a tool for intercepting browser traffic. Both were modified to work on Android. The project is released under the MIT license and is intended for debugging, testing, and educational use only. The disclaimer makes clear it should not be used to inspect traffic without authorization.

Where it fits