aboutsummaryrefslogtreecommitdiffstats
path: root/examples/simple/custom_option.py
blob: c8bc98d4834180e90591f6232095edeebe8bc018 (plain)
1
2
3
4
5
6
7
8
9
10
11
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)