Network Conditions

Add latency, cap bandwidth and make connections fail, for everything or for a single host.

Mac Android

Network Conditions lets you test the bad network from a good one. Pick a profile for the traffic WireLens captures and watch how your app copes with a slow API, a flaky connection, or none at all. It is on the Mac and on Android.

Shaping only affects traffic that goes through WireLens. While a profile is on, the timings in the capture are the shaped timings.

On the Mac#

Traffic
Rules
Setup
Network Conditions
Simulate slow or unreliable networks, globally or per host.
Status
Shaping traffic. Captured timings include the simulated conditions.Global: 1.6 Mbps ↓ 750 kbps ↑ · 150 ms ± 30 · 1 host override active
Reset Global Profile
Global profile
Preset
UnthrottledOfflineVery Bad Network2G / EDGESlow Network3GMedium Network4G / LTEWi-FiWi-Fi 802.11ac
Name
3G
Bandwidth
1600kbps ↓750kbps ↑
0 means unlimited.
Range
0min ↓0max ↓0min ↑0max ↑
Optional. The rate varies between min and max every second.
Latency
150ms±30ms jitter
Loss
0% of requests reset
Preset nameSave as Preset
Applies to every request that no host override matches.
Host overrides
1 rule · 1 armedExpand AllDisable All
payments.acme.dev128 kbps ↓ 64 kbps ↑ · 800 ms ± 400 · 5% reset
Add Host Override
The first enabled override whose host matches replaces the global profile.
Tools ▸ Network Conditions

Open Tools ▸ Network Conditions. Status says whether WireLens is shaping traffic, and Reset Global Profile puts the global profile back to Unthrottled.

Profiles#

The Global profile applies to every captured request that no host override matches. Pick a Preset and adjust any field: Bandwidth for download and upload, Latency with a ± jitter, and Loss as the percentage of requests that are reset. Save as Preset keeps your own numbers under Saved presets.

PresetDownloadUploadLatencyJitterLoss
Very Bad Network128 kbps64 kbps800 ms400 ms5%
2G / EDGE250 kbps100 kbps400 ms80 ms1%
Slow Network780 kbps330 kbps200 ms40 ms0%
3G1.6 Mbps750 kbps150 ms30 ms0%
Medium Network4 Mbps1 Mbps100 ms20 ms0%
4G / LTE12 Mbps5 Mbps50 ms10 ms0%
Wi-Fi30 Mbps15 Mbps20 ms5 ms0%
Wi-Fi 802.11ac240 Mbps120 Mbps5 ms2 ms0%

The presets use steady, repeatable numbers rather than modelling a particular carrier. Unthrottled turns shaping off. Offline fails every connection rather than setting the speed to zero, which gives your app a real failure instead of a request that hangs.

Range gives download and upload a band instead of one number. WireLens then picks a new speed inside that band every second, the way a real connection varies.

Host overrides#

Add Host Override gives a matching host its own profile. The first enabled override whose host matches wins, and it replaces the global profile for that host rather than adding to it. Put a specific host above a broad wildcard. An override can also be narrowed by Conditions.

New overrides start switched off: check the host, then switch the override on. A common setup: leave the global profile unthrottled and give only your payments or upload host a Very Bad Network profile.

Where each setting applies#

  • Latency, jitter, loss and upload speed apply to plain HTTP and to decrypted HTTPS, before WireLens connects to the server. Loss fails the whole exchange, because there is no single packet to drop once the connection ends at the proxy.
  • Download speed applies to plain HTTP, to decrypted HTTPS and to tunnels.
  • A tunnel is shaped by host rather than by request. Because WireLens cannot read inside it, an override narrowed by method or header does not apply there.

On Android#

Tools ▸ Network Conditions on Android
Tools ▸ Network Conditions

Open Tools ▸ Network Conditions and pick a Profile. It applies to every decrypted and cleartext HTTP exchange the device captures.

ProfileAdded latencyDownloadUpload
3G300 ms780 kbps330 kbps
Slow 3G2000 ms400 kbps400 kbps
Edge840 ms240 kbps200 kbps
LTE70 ms12000 kbps6000 kbps
Very bad network500 ms1000 kbps1000 kbps

Off leaves the network as it is. Custom takes your own Added latency (ms), Download (kbps) and Upload (kbps), where 0 means no limit. Tap Use custom profile to switch it on.

Android has one profile for all traffic, with no host overrides, jitter or loss.

Free and Pro#

FreePro
MacOne thing at a time: the global profile, or one host overrideAs many host overrides as you need
AndroidThe built-in profilesCustom profiles too

Command line and MCP#

The command line and the MCP server run on the Mac. wirelens ships inside the app and is not on your PATH until you link it once.

bash
wirelens rules throttle --delay 400

That sets the global profile's latency. The MCP tools are set_network_condition_profile for the global profile (presets unthrottled, edge, 3g, lte and wifi, or your own numbers), add_network_condition_rule for one host, and set_throttle for a plain delay.

Something here is unclear, or wrong for your setup? Contact support or write to support@wirelens.app.