[](https://gitter.im/elazarl/goproxy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[](https://gitter.im/elazarl/goproxy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Package goproxy provides a customizable HTTP proxy library for Go (golang),
Package goproxy provides a customizable HTTP proxy library for Go (golang),
...
@@ -8,7 +9,7 @@ It supports regular HTTP proxy, HTTPS through CONNECT, and "hijacking" HTTPS
...
@@ -8,7 +9,7 @@ It supports regular HTTP proxy, HTTPS through CONNECT, and "hijacking" HTTPS
connection using "Man in the Middle" style attack.
connection using "Man in the Middle" style attack.
The intent of the proxy, is to be usable with reasonable amount of traffic
The intent of the proxy, is to be usable with reasonable amount of traffic
yet, customizable and programable.
yet, customizable and programmable.
The proxy itself is simply a `net/http` handler.
The proxy itself is simply a `net/http` handler.
...
@@ -35,7 +36,7 @@ as customable as goproxy intend to be. The main difference is, Fiddler is not
...
@@ -35,7 +36,7 @@ as customable as goproxy intend to be. The main difference is, Fiddler is not
intended to be used as a real proxy.
intended to be used as a real proxy.
A possible use case that suits goproxy but
A possible use case that suits goproxy but
not Fiddler, is, gathering statisitics on page load times for a certain website over a week.
not Fiddler, is, gathering statistics on page load times for a certain website over a week.
With goproxy you could ask all your users to set their proxy to a dedicated machine running a
With goproxy you could ask all your users to set their proxy to a dedicated machine running a
goproxy server. Fiddler is a GUI app not designed to be ran like a server for multiple users.
goproxy server. Fiddler is a GUI app not designed to be ran like a server for multiple users.
...
@@ -43,27 +44,31 @@ goproxy server. Fiddler is a GUI app not designed to be ran like a server for mu
...
@@ -43,27 +44,31 @@ goproxy server. Fiddler is a GUI app not designed to be ran like a server for mu
To get a taste of `goproxy`, a basic HTTP/HTTPS transparent proxy
To get a taste of `goproxy`, a basic HTTP/HTTPS transparent proxy
```go
packagemain
import (
import(
"github.com/elazarl/goproxy"
"github.com/elazarl/goproxy"
"log"
"log"
"net/http"
"net/http"
)
)
func main() {
proxy := goproxy.NewProxyHttpServer()
proxy.Verbose = true
log.Fatal(http.ListenAndServe(":8080", proxy))
}
funcmain(){
proxy:=goproxy.NewProxyHttpServer()
proxy.Verbose=true
log.Fatal(http.ListenAndServe(":8080",proxy))
}
```
This line will add `X-GoProxy: yxorPoG-X` header to all requests sent through the proxy
This line will add `X-GoProxy: yxorPoG-X` header to all requests sent through the proxy