Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for IPv6? #73

Open
reedjasonf opened this issue Mar 2, 2018 · 2 comments
Open

Support for IPv6? #73

reedjasonf opened this issue Mar 2, 2018 · 2 comments

Comments

@reedjasonf
Copy link

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

@ghost
Copy link

ghost commented Jan 11, 2019

我发现了,由于没有处理使用--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

@ghost
Copy link

ghost commented Jan 12, 2019

Pls pull the newest code and check README to run as IPv6 mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant