From 47488248d2ae26b773926943ba409a27493ebbbf Mon Sep 17 00:00:00 2001 From: Barna Csorogi Date: Mon, 5 Feb 2018 01:21:11 +0100 Subject: [PATCH] add dummy implementation for mitmConn.LocalAddr() Fixes panic due to unimplemented method when the stdlib http server calls this under certain conditions. For our mitm implementation of net.Conn, an empty address string should be sufficient. --- proxy/mitmconn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/mitmconn.go b/proxy/mitmconn.go index 5ef7c6e..07bc955 100644 --- a/proxy/mitmconn.go +++ b/proxy/mitmconn.go @@ -48,7 +48,7 @@ func (c *mitmConn) RemoteAddr() net.Addr { } func (c *mitmConn) LocalAddr() net.Addr { - panic("not implemented") + return addr("") } func (c *mitmConn) SetDeadline(t time.Time) error {