mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
b72f139093
Options are now available globally on ctx, so the first argument of configure is redundant.
12 lines
271 B
Python
12 lines
271 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(updated):
|
|
if "custom" in updated:
|
|
ctx.log.info("custom option value: %s" % ctx.options.custom)
|