mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +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") |