mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2024-12-12 07:35:45 +00:00
32 lines
491 B
Python
32 lines
491 B
Python
import time
|
|
from libmproxy.script import concurrent
|
|
|
|
|
|
@concurrent
|
|
def clientconnect(context, cc):
|
|
context.log("clientconnect")
|
|
|
|
|
|
@concurrent
|
|
def serverconnect(context, sc):
|
|
context.log("serverconnect")
|
|
|
|
|
|
@concurrent
|
|
def request(context, flow):
|
|
time.sleep(0.1)
|
|
|
|
|
|
@concurrent
|
|
def response(context, flow):
|
|
context.log("response")
|
|
|
|
|
|
@concurrent
|
|
def error(context, err):
|
|
context.log("error")
|
|
|
|
|
|
@concurrent
|
|
def clientdisconnect(context, dc):
|
|
context.log("clientdisconnect") |