mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 10:26:23 +00:00
18 lines
277 B
Python
18 lines
277 B
Python
|
from mitmproxy import command
|
||
|
from mitmproxy import ctx
|
||
|
|
||
|
|
||
|
class MyAddon:
|
||
|
def __init__(self):
|
||
|
self.num = 0
|
||
|
|
||
|
@command.command("myaddon.inc")
|
||
|
def inc(self) -> None:
|
||
|
self.num += 1
|
||
|
ctx.log.info("num = %s" % self.num)
|
||
|
|
||
|
|
||
|
addons = [
|
||
|
MyAddon()
|
||
|
]
|