DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (55f382781e14)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
:mod:`mozproxy` --- Provides an HTTP proxy
==========================================

Mozproxy let you launch an HTTP proxy when we need to run tests against
third-part websites in a reliable and reproducible way.

Mozproxy provides an interface to a proxy software, and the currently
supported backend is **mitmproxy** for Desktop and Android.

Mozproxy is used by Raptor to run performance test without having to interact
with the real web site.

Mozproxy provide a function that returns a playback class. The usage pattern is
::

   from mozproxy import get_playback

   config = {'playback_tool': 'mitmproxy'}
   pb = get_playback(config)
   pb.start()
   try:
     # do your test
   finally:
     pb.stop()

**config** is a dict with the following options:

- **playback_tool**: name of the backend. can be "mitmproxy", "mitmproxy-android"
- **playback_tool_args**: extra options to pass to the playback tool
- **playback_version**: playback tool version
- **playback_binary_manifest**: tooltool manifests for the proxy backend binary
- **playback_pageset_manifest**: tooltool manifest for the pagesets archive
- **playback_artifacts**: links to downloadable artifacts
- **binary**: path of the browser binary
- **obj_path**: build dir
- **platform**: platform name (provided by mozinfo.os)
- **run_local**: if True, the test is running locally.
- **app**: tested app. Can be "firefox",  "geckoview", "refbrow", "fenix" or  "firefox"
- **host**: hostname for the policies.json file
- **local_profile_dir**: profile dir


Supported environment variables:

- **MOZPROXY_DIR**: directory used by mozproxy for all data files, set by mozproxy
- **MOZ_UPLOAD_DIR**: upload directory path
- **GECKO_HEAD_REPOSITORY**: used to find the certutils binary path from the CI
- **GECKO_HEAD_REV**: used to find the certutils binary path frmo the CI
- **HOSTUTILS_MANIFEST_PATH**: used to find the certutils binary path from the CI