NetPeek is a local network capture & debugging tool. All traffic analysis happens on-device — nothing is uploaded. This manual is organized by core feature; tap a chip to jump, and the blue buttons open the matching feature directly.
Capture is where everything starts: once on, the app takes over traffic through a local VPN tunnel and records every request/response for you to inspect.
On the home screen tap the big Start Capture button; the first time, allow the VPN configuration.
Use your other apps normally — requests appear live in the Recent Requests list.
Tap any row for Request Detail: URL, request/response headers, body, status code, timing and TLS info.
Tap the big button again to Stop Capture.
Swipe a row for shortcuts: copy as cURL, add filter, add MITM, New rewrite from this request, export HAR, favorite, delete.
Plain HTTP is readable as-is; HTTPS must be decrypted first (next section), otherwise you only see the host and encrypted bytes.
2Decrypt HTTPS (install the certificate)
To read HTTPS content you must install and trust the CA certificate NetPeek generates on-device. You do this manually — iOS forces the step through Settings.
After starting capture, open the certificate page at http://127.0.0.1:8080 in a browser and download the profile.
Go to Settings → General → VPN & Device Management and install the profile.
Then Settings → General → About → Certificate Trust Settings and enable full trust for the NetPeek certificate.
Add the domains you want to decrypt to the MITM host list (section 9).
The certificate is only for on-device debugging and is never uploaded. Upstream certificate verification is fail-open by default (it won't break connectivity on cert issues), so you can debug misconfigured servers.
3Rewrite rules (Simple mode)
Rewriting changes traffic without changing code: add headers, replace response fields, mock APIs, block ads, redirect. A rule = a condition (when it applies) + an action (what to do). Beginners use Simple mode — a few taps.
Swipe a row in Recent Requests → "New rewrite" (host/path prefilled), or tap + in the rewrite list.
When it applies: pick "All requests" or add conditions (host contains / path begins with …).
What to do: pick one of six intent cards.
Set the details: fill fields per intent. A plain-language summary updates live; confirm and tap Save & Enable.
Intent
Use
Edit Header
Add / change / delete a request or response header
Edit Body
Replace a piece of text in the response/request body
Mock response
Skip the real request and return custom content
Block request
Return empty response / JSON / image — great for ad & tracker blocking
Redirect
Send the request to another URL (e.g. prod → staging)
Multiple conditions are combined with AND. For OR, create another rule with the same action. For richer combos (multiple actions, parentheses, regex), tap Expert mode at the top-right of the editor.
4Rewrite rules · Expert syntax (DSL)
Expert mode lets you write the rule statement directly for full power. The first symbol of an action (^ replace, ~ delete, or an @ whole-request verb) decides what; the following @req.*/@rsp.* decides where; quotes hold the value.
Always use straight ASCII quotes "; curly quotes silently break a rule.
Condition objects
Object
Meaning
Example
@req.host
Request host
@req.host CONTAINS "example.com"
@req.api
Path
@req.api BEGINSWITH "/api/v1"
@req.url
Full URL
@req.url MATCHES ".*\.jpg(\?.*)?$"
@req.query
Query string
@req.query CONTAINS "debug=1"
@req.method
HTTP method
@req.method == "POST"
@req.port / @req.schema
Port / scheme
@req.schema == "http"
@req.header["Name"]
Request header
@req.header["Content-Type"] CONTAINS "json"
@req.bodyText
Request body
@req.bodyText CONTAINS "vip"
@rsp.header["Name"]
Response header
@rsp.header["Content-Type"] CONTAINS "json"
@rsp.bodyText
Response body
@rsp.bodyText CONTAINS "false"
@rsp.status / @rsp.statusLine
Status code / line
@rsp.status == "404"
Comparison & logic
Compare: ==!=><>=<=CONTAINSBEGINSWITHENDSWITHLIKE (wildcards */?) MATCHES (regex, whole match) INANY/ALL/NONE. Logic: && (AND) || (OR) ! (NOT), group with ().
Actions
Action
Meaning
Example
^
Replace / insert
^@req.header["X-Debug"] "1"
~
Delete
~@req.header["Authorization"]
@mock
Return a custom response
@mock "{\"ok\":true}"
@reject*
Empty content (empty / image / object / array)
@reject-array
@redirect
Redirect (or @301…@308)
@redirect 307 "https://test/x"
@map-local
Serve a local file
@map-local "/shared/mock.json"
@break
Break the request
@break
ExampleAdd a debug header and flip a response field to true
When rules aren't enough, use JavaScript to handle matched requests more flexibly: read/rewrite request & response, gunzip bodies, compute values conditionally. Scripts are scoped by host and run in the tunnel, like rules.
Tap + in the script list, set a name and scope (host).
Write your logic in the editor (helpers like $utils provide gzip/gunzip etc.).
Save & enable, then re-send the request to see the effect.
Store frequently-used values (a mock JSON, a token, a test URL) as constants and reference them in rules with ${constantId} — change one place, update everywhere.
Simple-mode Mock already assembles the response for you, so you rarely need a constant by hand; constants shine when reused across several expert-mode rules.
8Filters (see only what matters)
The capture list gets long. Filters cut the noise:
Record only certain hosts: everything else stays out of the list.
Ignore certain hosts: exclude them from the list.
Swipe a row → "Add filter / Record this host" to add quickly.
9MITM host list
For performance and stability, NetPeek only decrypts (MITM) the domains you specify; the rest pass through transparently. The list supports wildcards:
+host / a bare host = decrypt that host; * = decrypt everything.
-*host* = explicitly do not decrypt (blacklist, higher priority than wildcards).
Swipe a row → "Add MITM / Add MITM blacklist" to maintain it quickly.
The app's own backend (control-plane) domain is always forced direct, never decrypted, and never written to the capture database — a safety red line.
10Toolbox
Open Settings → Toolbox for encoding, hashing, encryption helpers, timestamps, UUIDs, JSON formatting, and more. Use the regex tool to validate match patterns before you write rewrite rules.
11MCP service
To let a desktop AI client help analyze captures on this phone, turn on NetPeek MCP. Find it under Settings → NetPeek MCP (off by default).
Enable the service and copy the access token.
On a computer on the same network (or over USB), enter the service address and token in your AI client.
Once connected, you can browse captures, inspect requests, and import rules when needed.
Don’t share the token with untrusted people, and avoid leaving the service on untrusted networks. Turn it off or revoke the token when you’re done.
12Sharing & importing rules
Share rewrite rules with teammates, or import rules someone sent you. Sign in before sharing or importing.
Share rules
Open Rewrite Rules, select the rules, then choose Share.
Enter a title, set how many times it can be imported, and how many days it stays valid.
Confirm, then copy the share command (or use the system share sheet) and send it.
If the selection includes private rules, you’ll be asked to confirm: recipients can use those rules, but can’t view, edit, re-share, or export their contents.
Import rules
Copy the share command or link you received.
Open NetPeek — if a share is detected on the clipboard, you’ll be prompted to review and import it.
Or open Rewrite Rules → Import Share Code, paste the code, review, then redeem.
Review shows only basic info such as title, publisher, and counts. Rule content downloads after you confirm. You can’t import a share you created yourself.
Manage & update
From Rewrite Rules → more menu, open Manage shares to copy the command, view it, or revoke a share.
After revoke, new imports fail; rules already imported are not removed automatically.
After you edit and save rules, you can Push update on an existing share. Recipients who see Update available can tap Get update.
13Privacy & safety
Captured traffic stays on your device by default and isn’t uploaded for analysis.
HTTPS decryption requires you to install and trust the certificate in iOS Settings.
Private rules are shared for use only, limiting who can read or redistribute their contents.
Only capture and modify traffic in environments you’re authorized to debug.
To verify a rewrite: save and enable it, send the request again, then check the latest request detail — don’t rely only on older captures.