Serving on IPv6


#1

Hello.
I can’t set up mitmproxy to listen on any IPv6 interface - be it a loopback or a regular interface. I tried different -b options, including “::”, “::1”. “[::]”, “[::1]” and others on Windows and Linux – with same results,
Error starting proxy server: gaierror(11001, 'getaddrinfo failed')
on Windows,
and similar error
Error starting proxy server: gaierror(-9, ...
on Linux/FreeBSD. What am I missing?


#2

@hedger Got error "gaierror: [Errno -2] Name or service not known" when run py.test
Try this


#3

@ujjwal96: I think that’s unrelated. AFAIK the relevant code is just hardcoded to IPv4: https://github.com/mitmproxy/mitmproxy/blob/2316c0fb74efefd76970c685b8f77f45834f1490/mitmproxy/net/tcp.py#L921

This is something we should fix at some point. Feel free to open a GitHub issue for this so that it doesn’t get lost!


#4

Ah I see, I probably didn’t read the question correctly that time.
Sure I’ll open an issue :slight_smile:


#5

I added support for that, https://github.com/mitmproxy/mitmproxy/pull/1995