fix mac os safari bug && update doc

main
boya 7 years ago
parent 5e163aad16
commit b2b4a19c5d
  1. 4
      readme.md
  2. 3
      src/vendor/mitm/mitm.go

@ -40,7 +40,7 @@ gomitmproxy
gomitmproxy -m gomitmproxy -m
``` ```
![fetch http](https://raw.githubusercontent.com/sheepbao/gomitmproxy/master/src/doc/goproxy.png) ![fetch http](https://raw.githubusercontent.com/sheepbao/gomitmproxy/master/doc/goproxy.png)
加 -m 参数,表示抓取http请求和响应 加 -m 参数,表示抓取http请求和响应
@ -59,7 +59,7 @@ gomitmproxy -m
``` ```
然后浏览器设置代理,ip为localhost,端口为8080,即可实现科学上网 然后浏览器设置代理,ip为localhost,端口为8080,即可实现科学上网
![proxy](https://raw.githubusercontent.com/sheepbao/gomitmproxy/master/src/doc/proxy.png) ![proxy](https://raw.githubusercontent.com/sheepbao/gomitmproxy/master/doc/proxy.png)
## 最后 ## 最后

@ -269,7 +269,8 @@ func (hw *HandlerWrapper) Forward(resp http.ResponseWriter, req *http.Request, r
if req.Method == "CONNECT" { if req.Method == "CONNECT" {
b := []byte("HTTP/1.1 200 Connection Established\r\n" + b := []byte("HTTP/1.1 200 Connection Established\r\n" +
"Proxy-Agent: gomitmproxy/" + Version + "\r\n\r\n") "Proxy-Agent: gomitmproxy/" + Version + "\r\n" +
"Content-Length: 0" + "\r\n\r\n")
_, err := connIn.Write(b) _, err := connIn.Write(b)
if err != nil { if err != nil {
mylog.Println("Write Connect err:", err) mylog.Println("Write Connect err:", err)

Loading…
Cancel
Save