Skip to main content

Route through an upstream proxy

TestingBot Tunnel has built-in support for forwarding its traffic through an upstream proxy. The most common use cases are corporate proxies that require all outbound traffic to be inspected, and GeoIP proxies for region-specific testing.

Basic configuration

Pass the proxy host and port with --proxy, and credentials with --proxy-userpwd.

java -jar testingbot-tunnel.jar --proxy <proxy-host:proxy-port> --proxy-userpwd <username>:<password>

The tunnel forwards both HTTP and HTTPS URLs to the upstream proxy. SOCKS and SOCKS5 are also supported, prefix the proxy URL with socks:// or socks5://.

Corporate proxies

Forward both the control channel (to *.testingbot.com) and the test traffic through your authenticated proxy.

Export TESTINGBOT_PROXY_USERPWD instead of passing -z on the command line so the credentials never appear in the process list.

export TESTINGBOT_PROXY_USERPWD=alice:hunter2
java -jar testingbot-tunnel.jar --proxy corp-proxy.example.com:8080

PAC files

Pass the URL of a Proxy Auto-Config file with --pac. The tunnel evaluates the PAC script for every outbound request and routes accordingly.

java -jar testingbot-tunnel.jar --pac https://corp.example.com/proxy.pac

Things to know

  • TestingBot Tunnel proxies both HTTP and HTTPS URLs through the upstream proxy.
  • WebSocket and SSE traffic requires --nobump --nocache in addition to the proxy flags.
  • See the commandline reference for the full list of proxy-related flags.
Was this page helpful?
Last updated