We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我在尝试使用gomitmproxy的Forward功能,将请求代理至下一级代理,我想在转发的时候做一个计数统计,看一段时间内转发了多少请求。 我发现使用了io.Copy(dst, src)之后,所有请求在两个connection之间直接拷贝转发,根本拦截不到到底发送了多少个请求。有办法可以满足我的技术需求吗?谢谢
The text was updated successfully, but these errors were encountered:
目前的实现是直接用io.Copy,实现两个tcp连接直接交换数据,你要统计http请求,就必须解析http协议报文,你得自己重新实现Transport,解析connIn的http req(这里可以考虑用https://golang.org/pkg/io/#TeeReader copy一份流来做解析统计),然后写入connOut,再从connOut读取数据写入connIn。解析httpreq, golang相关的接口https://golang.google.cn/pkg/net/http/#ReadRequest
Sorry, something went wrong.
No branches or pull requests
我在尝试使用gomitmproxy的Forward功能,将请求代理至下一级代理,我想在转发的时候做一个计数统计,看一段时间内转发了多少请求。
我发现使用了io.Copy(dst, src)之后,所有请求在两个connection之间直接拷贝转发,根本拦截不到到底发送了多少个请求。有办法可以满足我的技术需求吗?谢谢
The text was updated successfully, but these errors were encountered: