Open
Description
I try to use interceptors to handle filters, but it seems not to work
package main
import (
"log"
"net/http"
"github.com/elazarl/goproxy"
"github.com/sirupsen/logrus"
)
func main() {
logrus.SetLevel(logrus.DebugLevel)
proxy := goproxy.NewProxyHttpServer()
proxy.Verbose = true
logrus.Debug("Starting")
proxy.OnRequest(goproxy.DstHostIs("www.reddit.com")).DoFunc(
func(r *http.Request, ctx *goproxy.ProxyCtx) (*http.Request, *http.Response) {
logrus.Debug("interceptor")
return r, nil
})
log.Fatalln(http.ListenAn
5229
dServe(":8080", proxy))
}
Metadata
Metadata
Assignees
Labels
No labels