zboya
zboya
我今天抓包看看,好久没维护了
我看了,https是可以代理成功的,你是否添加了证书?
目前的实现是直接用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
@lixin9311
@JavinYang when I using TAP device, it can read data from main program. using TUN device don't work.
@lixin9311 I had set the address of the adapter to 192.168.1.10/24 and the gateway 192.168.1.1/24. but using the TUN device still can't read data. using TAP device can read data.
I run this program in windows 10 in parallels desktop. maybe the vm has some different.
I run this program in real windows 10, and found the Nic can't set IP address to 192.168.1.10, it set the IP address to 169.254.x.x, this IP address is assigned...
@lixin9311 how did you set windows gateway?what cmd you used?
看代码还是没实现 sm3 sm4,sm3的消息摘要算法没用,sm4分组加密也没用,不符合gm ssl,gm ssl的要求,http://www.gmbz.org.cn/main/viewfile/20180110021416665180.html