function triggerRedirect() {
  const PROXY_FUNCTION = "function FindProxyForURL(url, host) {"                +
                         "  return 'PROXY a_non_existent_domain_x7x6c572v:80; " +
                                   "PROXY localhost:" + HTTP_PORT + "';"        +
                         "}";

  let prefsService = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService);
  let prefs = prefsService.getBranch("network.proxy.");
  prefs.setIntPref("type", 2);
  prefs.setCharPref("autoconfig_url", "data:text/plain," + PROXY_FUNCTION);
}
// Set a proxy function to cause an internal redirect.
Set a proxy function to cause an internal redirect.
Set a proxy function to cause an internal redirect .
function triggerRedirect() {
  const PROXY_FUNCTION = "function FindProxyForURL(url, host) {"                +
                         "  return 'PROXY a_non_existent_domain_x7x6c572v:80; " +
                                   "PROXY localhost:" + HTTP_PORT + "';"        +
                         "}";
  let prefsService = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService);
  let prefs = prefsService.getBranch("network.proxy.");
  prefs.setIntPref("type", 2);
  prefs.setCharPref("autoconfig_url", "data:text/plain," + PROXY_FUNCTION);
}
function triggerRedirect ( ) { const PROXY_FUNCTION = "function FindProxyForURL(url, host) {" + "  return 'PROXY a_non_existent_domain_x7x6c572v:80; " + "PROXY localhost:" + HTTP_PORT + "';" + "}" ; let prefsService = Cc [ "@mozilla.org/preferences-service;1" ] . getService ( Ci . nsIPrefService ) ; let prefs = prefsService . getBranch ( "network.proxy." ) ; prefs . setIntPref ( "type" , 2 ) ; prefs . setCharPref ( "autoconfig_url" , "data:text/plain," + PROXY_FUNCTION ) ; }
Set a proxy function to cause an internal redirect.
Set a proxy function to cause an internal redirect .