(w http.ResponseWriter, key *[ivLen]byte, p []byte, code int)
| 101 | } |
| 102 | |
| 103 | func (proxy *ProxyServer) Write(w http.ResponseWriter, key *[ivLen]byte, p []byte, code int) (n int, err error) { |
| 104 | if ctr := proxy.Cipher.getCipherStream(key); ctr != nil { |
| 105 | ctr.XORKeyStream(p, p) |
| 106 | } |
| 107 | |
| 108 | w.WriteHeader(code) |
| 109 | return w.Write(p) |
| 110 | } |
| 111 | |
| 112 | func (proxy *ProxyServer) hijack(w http.ResponseWriter) net.Conn { |
| 113 | hij, ok := w.(http.Hijacker) |
no test coverage detected