Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ mitmpgo.WithDisableProxy()
mitmpgo.WithRootCAs("path/to/root-ca1.crt", "path/to/root-ca2.crt")

// Configure certificate cache pool
mitmpgo.WithCertCachePool(1000, 60000, 3600000)
mitmpgo.WithCertCachePool(2048, 30, 15)

// Custom dialer with timeout
mitmpgo.WithDialer(&net.Dialer{
Expand Down Expand Up @@ -191,6 +191,9 @@ mitmpgo.WithErrorHandler(func(ec mitmpgo.ErrorContext) {
```go
// Skip SSL verification when connecting to servers (not recommended for production)
mitmpgo.WithSkipVerifySSLFromServer()

// mTLS client-authentication
mitmpgo.WithClientCert("example.com", mitmpgo.ClientCert{CertPath: "certs/client.crt", KeyPath: "certs/client.key" })
```

### Protocol Options
Expand Down
6 changes: 5 additions & 1 deletion examples/dumper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ func main() {
mitmpgo.WithHTTPInterceptor(httpInterceptor),
mitmpgo.WithWebsocketInterceptor(websocketInterceptor),
mitmpgo.WithErrorHandler(errHandler),
// mitmpgo.WithRootCAs("certs/other-ca.crt"),
// mitmpgo.WithClientCert("127.0.0.1", mitmpgo.ClientCert{
// CertPath: "certs/client.crt",
// KeyPath: "certs/client.key",
// }),
// mitmpgo.WithRootCAs("certs/ca.crt"),
// mitmpgo.WithIncludeHosts("ifconfig.co", "*.example.com", "example.com", "*.bilibili.com"),
// mitmpgo.WithIncludeHosts("api.bilibili.com"),
// mitmpgo.WithExcludeHosts("www.baidu.com"),
Expand Down
Loading
Loading