aboutsummaryrefslogtreecommitdiffstats
path: root/examples/simple/custom_option.py
blob: e9c348508d85bf2652f3d7ae32722706e2904a3e (plain)
1
2
3
4
5
6
7
8
9
10
from mitmproxy import ctx


def start(options):
    ctx.log.info("Registering option 'custom'")
    options.add_option("custom", str, "default", "A custom option")


def configure(options, updated):
    ctx.log.info("custom option value: %s" % options.custom)