【问题标题】:libmproxy - how to load requests asynchronously?libmproxy - 如何异步加载请求?
【发布时间】:2016-02-02 10:08:08
【问题描述】:

我想知道如何使用 libmproxy 或 mitmproxy 异步加载请求。

我的代码如下所示:

class StickyMaster(controller.Master):
    def __init__(self):
          ......

    def handle_request(self):
         ....

    def handle_response(self):
         ....

【问题讨论】:

    标签: python-2.7 asynchronous mitmproxy libmproxy


    【解决方案1】:

    我建议使用 mitproxy 的内联脚本,它有一个 @concurrent 装饰器:http://docs.mitmproxy.org/en/latest/scripting/inlinescripts.html#running-scripts-in-parallel

    【讨论】:

    • 您好,可以在@concurrent中调用异步方法吗,因为我想在响应过滤后发送一个socket消息。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-22
    相关资源
    最近更新 更多