Support for IPv6?
Opened this issue · 2 comments
Does django-sslserver allow binding to an IPv6 address? I ask because when I bind to an IPv4 address like 127.0.0.1 or 192.168.1.2, the server works very well (except my browser complains that the certificate was for my www.domain.com, not 192.168.1.2). But when I try to bind to my IPv6 address, I get...
Django version 2.0.2, using settings 'myproject.settings' Starting development server at https://[redacted IPv6 address]:443/ Using SSL certificate: [redacted] Using SSL key: [redacted] Quit the server with CTRL-BREAK. Error: [Errno 11001] getaddrinfo failed
我发现了,由于没有处理使用--ipv6, -6运行的self.use_ipv6实例,使用了默认的address_family = socket.AF_INET而不是address_family = socket.AF_INET6,进而导致socket无法正常绑定。
参看这里的变更:Add IPv6 support.
使用方法:
python manage.py runsslserver -6 [::]:7443
Pls pull the newest code and check README to run as IPv6 mode.