Bandwidth Drain
Make residential proxy scraping uneconomical by increasing the scraper's metered bandwidth costs.
Residential proxy providers typically charge by the gigabyte. Bandwidth drain takes advantage of that pricing model by sending up to 10MB through a confirmed residential proxy connection. The proxy provider meters the transfer and bills the scraper using it.
At scale, the cost adds up quickly: 1,000 completed drains transfer about 10GB through the scraper's proxy network. Rotating IP addresses does not avoid the cost because each confirmed residential exit can be drained. This makes repeated scraping more expensive and, at sufficient volume, uneconomical.
Only residential proxies are drained
Normal visitors do not receive the payload. Datacenter and ISP proxies are also excluded because bandwidth is generally cheaper for those services, so a drain would not create the same economic pressure.
Enable bandwidth drain
Bandwidth drain is off by default. Enable it with the bandwidthDrain option.
Script URL parameter
<script src="https://cdn.layer3intel.com/tripwire.min.js?key=YOUR_API_KEY&bandwidthDrain=true"></script>Data attribute
<script
src="https://cdn.layer3intel.com/tripwire.min.js"
data-key="YOUR_API_KEY"
data-bandwidth-drain="true"></script>At runtime
window.Tripwire.init({ bandwidthDrain: true });
const result = await window.Tripwire.run({ bandwidthDrain: true });run(options) applies its options through init(), so the setting remains active for later runs on the same page. Pass { bandwidthDrain: false } to disable it again.
Eligible connections
A drain runs only when all three conditions are met:
bandwidthDrainis enabled.- The RTT probe detects the additional hop created by a forwarded connection.
- Layer3 identifies the IP address as a known residential proxy exit.
If any check fails, Tripwire skips the drain. This includes normal connections, datacenter and ISP proxies, unlisted proxy exits, and connections where the RTT result and IP classification do not agree.
If the client disconnects before receiving the full 10MB, only the bytes already transferred count toward its bandwidth usage.
Trade-offs
A drain delays the assessment token until the transfer finishes or reaches its 60-second limit. When bandwidth drain is enabled, Tripwire raises the effective timeout floor to 70 seconds, even if timeout is set lower. Connections that do not qualify for a drain follow the normal path without this delay.
Avoid enabling bandwidth drain on a blocking form submission. With auto=form, the form waits for the assessment token, which can leave a confirmed proxy connection waiting for several seconds. Use bandwidth drain on content pages, listings, and other routes you want to protect from scraping.
If a drain cannot complete, run() rejects and the tripwire:error event fires. Handle that case in your integration if the surrounding flow depends on receiving a token.