Daphne should use Twisted's strports/serverFromString for TLS/ACME support
See original GitHub issueThis would replace this code (https://github.com/andrewgodwin/daphne/blob/master/daphne/server.py#L46) with a user passing a strports description on the command line, which is fed into http://twistedmatrix.com/documents/current/api/twisted.internet.endpoints.html#serverFromString. For example, to support unix sockets it would be unix:/var/run/finger
, for TCP it’d be tcp:8000
, for basic TLS it would be ssl:443:privateKey=key.pem:certKey=crt.pem
, for txsni (TLS w/ SNI) it would be txsni:certificates:tcp:443
, and for the automatic, turn-on TLS+SNI, it would be le:/srv/www/certs:tcp:443
(https://github.com/mithrandi/txacme).
I’m happy to implement this, but I thought I’d file an issue since it’s been on my mind for so long 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Securing Ingress Resources - cert-manager Documentation
A common use-case for cert-manager is requesting TLS signed certificates to secure your ingress resources. This can be done by simply adding annotations...
Read more >Automatic Certificate Management Environment (ACME)
Use of this protocol should radically simplify the deployment of HTTPS ... ACME servers that support TLS 1.3 MAY allow clients to send...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It does, you have to just use Twisted endpoint syntax and pass it to Daphne using the
-e
switch. For example:More docs on this here: https://twistedmatrix.com/documents/16.4.1/core/howto/endpoints.html#servers - though there are other things you can do with Twisted endpoints that aren’t there, like let’s encrypt support.
Also explained pretty clearly on the Daphne README: https://github.com/django/daphne (look for “SSL” on the page)