---
title: TestingBot Tunnel with an Upstream Proxy
description: Connect TestingBot Tunnel through an upstream HTTP, HTTPS or SOCKS proxy.
  Recipes for corporate proxies, GeoIP routing and PAC file configuration.
source_url:
  html: https://testingbot.com/support/tunnel/upstream-proxy
  md: https://testingbot.com/support/tunnel/upstream-proxy/index.md
---
# 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](https://testingbot.com/support/tunnel/commandline) for the full list of proxy-related flags.

### Looking for more help?

Have questions or need more information? Reach out via email or Slack.

[Email us](https://testingbot.com/contact/new)[Slack Join our Slack](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
