import mitmproxy.http
from mitmproxy import ctx


class Counter_Demo:
    def __init__(self):
        self.num = 0

    def request(self,flow: mitmproxy.http.HTTPFlow):
        self.num = self.num+1
        ctx.log.info("We've seen %d flows"%self.num)

addons=[
    Counter_Demo()
]