mitmproxy/examples/simple/custom_option.py
Aldo Cortesi 65f0885bd6 addon loader: add boot_into, which replaces returning from start()
While we're here, expand test coverage for addonmanager to 100%, and promote to
individual coverage.
2017-03-25 10:48:12 +13:00

12 lines
276 B
Python

from mitmproxy import ctx
def load(l):
ctx.log.info("Registering option 'custom'")
l.add_option("custom", bool, False, "A custom option")
def configure(options, updated):
if "custom" in updated:
ctx.log.info("custom option value: %s" % options.custom)