Skip to content

Commit

Permalink
Add verbose errors on proxy client TLS failures
Browse files Browse the repository at this point in the history
detect you a missing CA
  • Loading branch information
denandz committed Jan 28, 2022
1 parent bb8c520 commit e2dff1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ func main() {

// View for the logs, create this now so we dont miss logs
logText := tview.NewTextView()
logText.SetChangedFunc(func() {
if logText.HasFocus() {
app.Draw()
}
})
log.SetOutput(logText)
log.Println("Logger started")

Expand Down
3 changes: 3 additions & 0 deletions proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ func StartProxy(logger *modifier.Logger, config *Config) *martian.Proxy {
}

mc.SkipTLSVerify(true)
mc.SetHandshakeErrorCallback(func(req *http.Request, err error) {
log.Printf("[!] TLS client handshake error for domain %s: %v\n", req.Host, err)
})

p.SetMITM(mc)
}
Expand Down

0 comments on commit e2dff1b

Please sign in to comment.