MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
WebPagetest Forums - Ability to set a Proxy in a script

WebPagetest Forums

Full Version: Ability to set a Proxy in a script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there anyways I can simply say use the following proxy for all http or https traffic. Much in the same way that modern browsers typically provide the proxy functionality?

I am thinking something to the effect of :
firefoxPref network.proxy.http
firefoxPref network.proxy.http_port 80
firefoxPref network.proxy.no_proxies_on localhost,

Please note the above script does not work but just provided to give an idea of what I want to achieve whether it is IE, FF or Chrome

Is this possible?
More specifically please see below in Chrome this is actually possible

For example: "MAP *" --> Forces all hostnames to be mapped to
"MAP * proxy" --> Forces all subdomains to be resolved to "proxy".
"MAP [::1]:77 --> Forces "" to resolve to IPv6 loopback. Will also force the port of the resulting socket address to be 77.
"MAP * baz, EXCLUDE" --> Remaps everything to "baz", except for "".
These mappings apply to the endpoint host in a net::URLRequest (the TCP connect and host resolver in a direct connection, and the CONNECT in an http proxy connection, and the endpoint host in a SOCKS proxy connection)
For Chrome you can just specify whatever you want on the command-line (in the chrome tab of the advanced settings). You can either use the direct mappings or you can specify the proxy.

If you specify a proxy, you should use a PAC script that doesn't proxy localhost traffic, otherwise the testing itself will fail (and you'll probably need to host the pac file somewhere).

Here's a PAC script that I've used before:

function FindProxyForURL(url, host) {
  var lhost = host.toLowerCase();
  host = lhost;

  if ((host == "localhost") ||
      (shExpMatch(host, "localhost.*")) ||
      (host == "")) {
    return "DIRECT";

  if (url.substring(0,5) == "http:") {
    return "PROXY";

  return "DIRECT";
Reference URL's