a simple HTTP rewriting proxy

This is an example of using goproxy, a fast and robust multithread proxy engine to develop an HTTP proxy that rewrites content on the fly, with multiple search and substitutions. It can be useful for debugging and other less noble (but useful) purposes … // rewriting_proxy project main.go package main import ( "bytes" "flag" "io/ioutil" "log" "net/http" "github.com/elazarl/goproxy" ) var replacements = []struct { from []byte to []byte }{ {[]byte("#e8ecec"), []byte("Red")}, // ugly colors!...

August 12, 2016 · Andrea Manzini