mitmproxy/examples/simple/custom_option.py

12 lines
288 B
Python
Raw Normal View History

from mitmproxy import ctx
2017-03-23 21:15:41 +00:00
def load(options):
ctx.log.info("Registering option 'custom'")
options.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)