Will this work for your target? These recipes work for APIs, internal services, and sites that don’t aggressively block by ASN. If your target uses Cloudflare Bot Management, DataDome, or similar, the datacenter exit IP will get blocked at the edge regardless of region or rotation speed - no proxy product fixes that without residential IPs, which we don’t offer. See the introduction for the full caveat.
Pattern A: wrap the command
The wrapper form auto-injectsHTTPS_PROXY / HTTP_PROXY / ALL_PROXY into the child’s environment, and tears the tunnel down when the child exits. The child’s exit code propagates to tunnelbyte.
tunnelbyte exit codes.
Pattern B: long-running tunnel, multiple commands
Bring up the tunnel in the background, set the proxy env yourself, run anything you want against it, tear down when done. Useful when several commands share one session (cheaper, since the per-second meter doesn’t restart).proxy: line out of stdout (as above) instead of hardcoding a value.
GitHub Actions
Anonymous tier is enough for a smoke test; for anything real, set aTUNNELBYTE_TOKEN repo secret (paste the value from tunnelbyte token on a paid account).
Python
requests and httpx both read HTTPS_PROXY from the environment:
HTTPS_PROXY set by the wrapper, or from the proxy: line of a backgrounded tunnel - don’t hardcode the port):
aiohttp doesn’t honor HTTPS_PROXY by default; pass proxy= per request.
Node
fetch (Node 20+) honors HTTPS_PROXY only when run with --use-system-ca and NODE_OPTIONS set appropriately on older versions. The most portable path is undici’s ProxyAgent:
Cost-sensitive patterns
- Reuse a single session across commands (Pattern B) instead of spawning one wrapper per request. Per-second metering + per-byte metering both stop the moment the session tears down, so the cheap path is “one long session, many requests.”
- Choose the nearest region. Latency over the tunnel is mostly the round-trip from CI runner to exit node; pick the closest region to the runner, not the closest to the target. See
tunnelbyte regions. - Watch the live counters with
GET /v1/sessions/{id}(docs) - includes a livecost_*_millicentsbreakdown.
See also
- Routing modes - per-app proxy vs.
--allsystem route. tunnelbyte tunnel- the wrapper form, flags, exit codes.- Tiers - quotas you need to stay under on anonymous / free.