func handle(c protocols.Protocol, cg *mika.CryptoGenerator) { mikaConn, err := mika.NewMika(c, cg.NewCrypto(), nil) if err != nil { c.Close() utils.Errorf("Create mika connection error %s", err) return } mika.Serve(mikaConn) }
func _HTTPHandler(conn protocols.Protocol, req *http.Request) { utils.Infof("Sending request %v %v \n", req.Method, req.URL.Host) rmProxyHeaders(req) dump, err := httputil.DumpRequest(req, true) if err != nil { utils.Fatalf("%s", err) } conn.Write(dump) }
func _HTTPSHandler(client protocols.Protocol) { client.Write(HTTP200) }