Skip to content

Commit ec3d375

Browse files
readme
1 parent 99d6804 commit ec3d375

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

README.md

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,13 @@
22

33
[![GoDoc](https://godoc.org/github.com/go-httpproxy/httpproxy?status.svg)](https://godoc.org/github.com/go-httpproxy/httpproxy)
44

5-
## Introduction
6-
7-
`github.com/go-httpproxy/httpproxy` repository provides an HTTP proxy library
8-
for Go (golang).
9-
10-
The library is a customizable HTTP proxy; supports HTTP, HTTPS through CONNECT.
11-
And also provides HTTPS connection using "Man in the Middle" style attack.
5+
Package httpproxy provides a customizable HTTP proxy; supports HTTP, HTTPS through
6+
CONNECT. And also provides HTTPS connection using "Man in the Middle" style
7+
attack.
128

139
It's easy to use. `httpproxy.Proxy` implements `Handler` interface of `net/http`
1410
package to offer `http.ListenAndServe` function.
1511

16-
### Keep it simple, stupid!
17-
18-
> KISS is an acronym for "Keep it simple, stupid" as a design principle. The
19-
KISS principle states that most systems work best if they are kept simple rather
20-
than made complicated; therefore simplicity should be a key goal in design and
21-
unnecessary complexity should be avoided. [Wikipedia]
22-
2312
## Usage
2413

2514
Library has two significant structs: Proxy and Context.
@@ -29,7 +18,7 @@ Library has two significant structs: Proxy and Context.
2918
```go
3019
// Proxy defines parameters for running an HTTP Proxy. It implements
3120
// http.Handler interface for ListenAndServe function. If you need, you must
32-
// fill Proxy struct before handling requests.
21+
// set Proxy struct before handling requests.
3322
type Proxy struct {
3423
// Session number of last proxy request.
3524
SessionNo int64
@@ -70,8 +59,12 @@ type Proxy struct {
7059
OnResponse func(ctx *Context, req *http.Request, resp *http.Response)
7160

7261
// If ConnectAction is ConnectMitm, it sets chunked to Transfer-Encoding.
73-
// By default, it is true.
62+
// By default, true.
7463
MitmChunked bool
64+
65+
// HTTP Authentication type. If it's not specified (""), uses "Basic".
66+
// By default, "".
67+
AuthType string
7568
}
7669
```
7770

0 commit comments

Comments
 (0)