-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mitmproxy下载后,本地可以直接通过命令打开,但是lyrebird一直启动不了代理 #742
Comments
有几个问题啊:
是可以启动的吗? 2 |
您好,这个我启动的时候,前面一直都在请求http://127.0.0.1:9090/api/status,然后每次返回都在报错,最后超时后提示ERROR Start mitmdump failed. |
是这样的,现在我想排查一下您遇到的是什么问题。 或者如果你不方便执行它的话,可以尝试以下操作:
|
我也遇到了同样的问题,可以手动启动 ~/.lyrebird/bin/mitmdump,但还是报错 |
@zhaoye 大佬,我在本地debug了一下,发现是在轮询 /api/status 接口时 ProxyHandler 中命中条件走了 DuplicateRequest 的 handle,导致 retcode 为 901 非 200,wait_for_mitm_start 超过次数后返回 false 报错 is_mitm_start = self.wait_for_mitm_start(config, logger)
if is_mitm_start:
self.publish_init_status(queue, 'READY')
logger.log(60, f'HTTP proxy server start on {proxy_port}')
else:
self.publish_init_status(queue, 'ERROR')
self.show_mitmdump_start_timeout_help(mitmdump_path, logger) 目前解决方法是将 elif parsed_url.hostname in ['localhost', '127.0.0.1'] and parsed_url.port == application.config["mock.port"] :
DuplicateRequest().handle(handler_context)
return 改为 elif parsed_url.hostname in ['localhost', '127.0.0.1'] and parsed_url.port == application.config["mock.port"] and parsed_url.path in ['/api/status']:
handler_context.is_proxiable = False
return
elif parsed_url.hostname in ['localhost', '127.0.0.1'] and parsed_url.port == application.config["mock.port"] :
DuplicateRequest().handle(handler_context)
return 没有细看框架,不知道这样写是否有什么问题,同时想知道对本地回环做限制是为了什么? |
收到。 十分感谢。我们尽快看一下 |
收到。我们尽快排查 |
日志:
2023-02-23 10:52:09,035 /Users/xudongming/code_res/lyrebird-2.12.0/lyrebird/mitm/proxy_server.py:25
ERROR Start mitmdump failed.
Please check your mitmdump file ~/.lyrebird/bin/mitmdump
2023-02-23 10:52:09,038 /Users/xudongming/code_res/lyrebird-2.12.0/lyrebird/event.py:168
Mac平台,使用download_mitmproxy()方法下载的mitmproxy
The text was updated successfully, but these errors were encountered: