How to see what an app sends over the internet: a beginner's guide to network inspection
Every app on your phone or laptop talks to servers. Some talk to one. Some talk to forty before you have tapped anything. You do not have to take anyone's word for which is which: with a few free tools you can watch the
Every app on your phone or laptop talks to servers. Some talk to one. Some talk to forty before you have tapped anything. You do not have to take anyone's word for which is which: with a few free tools you can watch the traffic yourself.
This is a beginner's guide to doing exactly that. We will start with what a request actually is, then look at what you can learn without decrypting a single byte, and finally open one request all the way up. A small warning first: the techniques here are for apps and devices you own. More on that at the end.
Every request goes through three steps
Think of a request as a letter passing through an old postal sorting office. Before it can be delivered, three things happen.
DNS: looking up the address
Apps know servers by name, like api.example.com, but the network routes by IP address. So the first step is a DNS lookup: "what is the address for this name?" Classic DNS queries go out unencrypted, which means anyone on the path, including you on your own machine, can read the names being looked up. Some apps and browsers now use DNS over HTTPS, which hides those lookups inside ordinary encrypted web traffic.
TLS: sealing the envelope
Next the app opens a connection and starts TLS, the "S" in HTTPS. TLS does two jobs: it encrypts everything that follows, and it checks the server's certificate so the app knows it is talking to the real api.example.com and not an impostor.
Here is the catch that makes this whole post possible. The app's very first TLS message, the ClientHello, is sent before any keys exist, and it usually carries the hostname in a field called Server Name Indication (SNI). Servers need it because one IP address often hosts many sites. So the name is written on the outside of the envelope, in plain view.
There is a newer standard, TLS Encrypted Client Hello (ECH, published as RFC 9849 in March 2026), that encrypts the sensitive parts of the ClientHello under the server's public key. With ECH the outer ClientHello carries innocuous values and the real name rides inside, encrypted. It is a brand new standard, so expect most traffic you capture today to still show its SNI.
HTTP: the letter itself
Inside the sealed envelope is the actual HTTP request: a method like GET or POST, a path, headers such as User-Agent and Authorization, and maybe a body full of JSON. This is the part people usually mean by "what the app sends", and it is the part TLS hides.
The name, size and time are on the outside. The letter is sealed inside.
What you can see without decrypting anything
It is tempting to think encrypted traffic tells you nothing. It tells you a lot. Without breaking any encryption, a capture on your own device shows:
-
Who. Hostnames from DNS queries and from SNI. If a music player you just opened contacts
metrics.something.net, you learn that without reading a byte of the payload. - How much. The size of every connection. Encryption hides content, not length.
- When. Timestamps on every packet. Patterns jump out quickly.
A worked example. Say you leave an app idle on your desk for 10 minutes and see this:
host connections sent received
api.example.com 1 3 KB 41 KB
cdn.example.com 2 2 KB 8.4 MB
events.example.net 20 80 KB 6 KB
The CDN numbers look like content: small requests, big downloads. The third row is more interesting. Twenty connections in 10 minutes is one every 30 seconds, each sending about 4 KB (80 KB / 20) and getting almost nothing back. That shape, regular small uploads while you are not doing anything, is what telemetry usually looks like. You still do not know what is in those 4 KB, but you know enough to ask a good question.
Sorting by hostname, size and time reveals patterns without opening a thing
The tools, from gentlest to most invasive
Browser DevTools
If the "app" is a website or a web-based desktop app, start here. Every major browser has a network panel: Chrome's Network panel and Firefox's Network Monitor list each request with its URL, method, status, headers, size and timing, already decrypted, because the browser is the one doing the encryption. Open it, reload the page, and sort by domain. Zero setup, and often the most readable view you will ever get.
Application firewalls
For native apps, an application firewall tells you which program opened which connection, which a raw packet capture does not. Little Snitch does this on macOS and shows an alert whenever an app wants to connect. OpenSnitch is an interactive application firewall for Linux inspired by Little Snitch. Portmaster is a free and open source application firewall for Windows and Linux. None of them decrypt traffic. They show you who, where and how much, and they let you block it, which is a great way to find out what still works when a suspicious host is cut off.
PCAPdroid on Android
Phones are harder because you cannot easily run a capture tool next to the app. PCAPdroid solves this without root by using Android's VpnService: no remote VPN is created, the traffic is processed locally on the device. Its Connections tab lists each connection with the app that made it, the SNI or DNS name, and the traffic volume. It can also save a PCAP file for Wireshark.
Wireshark
Wireshark shows every packet, on every protocol, in detail. It is the microscope of this list and can feel overwhelming at first. Two display filters get you most of the way:
dns.qry.name
tls.handshake.extensions_server_name
The first shows the names your machine looked up. The second shows the SNI hostnames from TLS handshakes (both are standard fields in Wireshark's TLS and DNS filter references). Right-click either column and "Apply as Column", and you have a list of every host contacted.
Wireshark can even decrypt TLS without a proxy if the client cooperates. Per the Wireshark TLS wiki, Firefox, Chrome and curl write per-session secrets to a file when the SSLKEYLOGFILE environment variable is set, and you point Wireshark at that file. Most native apps do not support this, which is where the next tool comes in.
mitmproxy
mitmproxy is an intercepting proxy: the app connects to it, it connects to the real server, and it shows you everything in between, decrypted. That is a man-in-the-middle, done on purpose, on your own machine.
The trick is certificates. The first time mitmproxy runs, it creates its own certificate authority in ~/.mitmproxy, and uses it to generate a certificate for each site on the fly. Your device will not trust that CA until you install it, and that one step is what turns "untrusted stranger" into "proxy I chose". It is also why you should remove the CA when you are done.
A worked walkthrough: opening one envelope
Let's inspect one request end to end, with curl as our "app" and httpbin.org, a public test service that echoes requests back, as the server. Everything runs on our own laptop.
Step 1: the outside of the envelope. Run curl in verbose mode without any proxy:
curl -v "https://httpbin.org/get?q=lofi"
Verbose output shows the DNS answer, the TLS handshake and the HTTP exchange. Trimmed, with the IP replaced by a documentation address:
* Host httpbin.org:443 was resolved.
* IPv4: 203.0.113.10
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
> GET /get?q=lofi HTTP/2
> Host: httpbin.org
> User-Agent: curl/8.18.0
< HTTP/2 200
< content-type: application/json
curl can print the lines starting with > because it is the client and holds the keys. A Wireshark capture of the same request on the wire would show you the DNS query for httpbin.org, the ClientHello with SNI httpbin.org, and then a few kilobytes of encrypted records. Notice what is missing from the wire view: the path /get?q=lofi. Query strings travel inside the encrypted HTTP request, not on the envelope.
Step 2: open it. Start mitmproxy with no arguments. By default it listens on port 8080. Now send the same request through it, telling curl to trust mitmproxy's CA just for this command, so nothing on the system changes:
curl --proxy http://127.0.0.1:8080 \
--cacert ~/.mitmproxy/mitmproxy-ca-cert.pem \
"https://httpbin.org/get?q=lofi"
The flow appears in mitmproxy's list. Select it and you see the full request: method GET, path /get?q=lofi, every header, then the full JSON response. For a real app you would point it at the same proxy and install the CA on that device, and the flow list becomes a reading of everything the app says.
Step 3: ask questions. For every flow, check: Is this host expected? Does the body contain anything that identifies me or my device? Does it happen when I do something, or on a timer? Three questions, and most surprises surface.
Certificate pinning: why some apps refuse your proxy
Try the same with some apps and you will get connection errors instead of flows. Usually that is one of two things.
First, modern Android is strict by default. Per the Android network security configuration docs, apps targeting Android 7.0 (API level 24) and higher trust only the pre-installed system CAs unless they opt in, while apps targeting API level 23 and lower also trust user-added CAs. Installing mitmproxy's CA in your phone's settings makes it a user-added CA, so most current apps simply ignore it. PCAPdroid's TLS decryption guide is honest about this: TLS decryption on Android is not easy, and many apps will not cooperate.
Second, some apps go further and use certificate pinning: they ship with the expected public key (or its hash) and reject any chain that does not include it, even one your device fully trusts. The goal is to survive a hostile network, which is exactly the situation a proxy imitates. Pinning has real costs too: a key rotation without a backup pin can lock users out until an app update ships, and OWASP's guide argues that in nearly all cases pinning creates more risk than reward. Plenty of apps still use it.
A trusted CA is not enough when the app expects one specific key
We are not going to explain how to defeat pinning in apps you did not write. If an app pins, you still have the outside of the envelope: hosts, sizes and timing from PCAPdroid, Wireshark or a firewall. mitmproxy even suggests using ignore_hosts for pinned domains so you can inspect the rest. If you need more than that for an app, the respectful route is to ask its developers, or to pick software whose source you can read.
For the record, here is how Spotube looks from this side of the desk. We searched our code and found no certificate pinning, and our Android manifest does not set a custom network security config. Our Android build targets API level 37, so on a phone it follows the platform default above and ignores user-added CAs. The easiest way to watch Spotube's traffic is the desktop build on your own machine, starting from HttpClientFactory.kt, the one place the app builds its HTTP clients.
Inspect only what you own
The rule is simple: inspect apps on devices you own, or have explicit permission to test. Capturing other people's traffic on a shared network, a workplace or a café is a different activity, and in many places an illegal one. A proxy that decrypts traffic also sees passwords and session tokens in clear text, so treat capture files like secrets, and uninstall any CA you added once you are finished.
There is a flip side for developers. Anything an app sends can be read, replayed and forged by the person holding the device. That is why servers should never trust a client just because it is "their" app, a lesson we took seriously when we built Group Jam and wrote about how we treat every peer as hostile.
Start small. Open DevTools on a website you use daily, sort by domain, and count the hosts. The number is usually a conversation starter.
References
- RFC 1035: Domain names, implementation and specification: the DNS protocol.
- RFC 8484: DNS Queries over HTTPS: DNS lookups carried inside HTTPS.
- RFC 8446: TLS 1.3: the handshake and encryption behind HTTPS.
- RFC 6066: TLS Extensions: defines Server Name Indication.
- RFC 9849: TLS Encrypted Client Hello: encrypting the ClientHello, including the real hostname.
- RFC 9110: HTTP Semantics: methods, headers and status codes.
- Chrome DevTools: Network panel and Firefox Network Monitor: browser network inspection.
- Wireshark, its TLS wiki page and the TLS and DNS filter references: packet capture, key log decryption and display filters.
- mitmproxy, Getting started and About certificates: the intercepting proxy, its default port, its CA and its notes on pinning.
- PCAPdroid quick start and TLS decryption: rootless capture on Android and its limits.
- Little Snitch, OpenSnitch and Portmaster: application firewalls for macOS, Linux and Windows.
- Android network security configuration: default trust anchors and pinning on Android.
- OWASP: Certificate and Public Key Pinning: what pinning is and its trade-offs.
- Man-in-the-middle attack: background on the technique a proxy uses.
- Everything curl: verbose and httpbin: the client and test server from the walkthrough.
Originally published on spotube.org.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.

