Hypercorn + Easy https:// with SNI
Project description
Snipercorn
Hypercorn + SNI (multiple SSL certificates per server) + easy letsencrypt integration
Snipercorn is a layer on top of the Hypercorn web server designed to make it as easy as possible to use https:// with your Python project. It extends Hypercorn’s Config class to look for a tree of certificates in a layout compatible with the dehydrated ACME / letsencrypt client (https://dehydrated.io), making it easier for any project on the public web to run with a real https certificate.
Usage
Download dehydrated.io client.
Make config directory ~/etc/dehydrated/config:
CA="https://acme-v02.api.letsencrypt.org/directory" CHALLENGETYPE="tls-alpn-01"
Snipercorn can serve the tls-alpn-01 challenge type.
~/etc/dehydrated/domains.txt should contain the fqdn of your server and desired alternate names:
example.com www.example.com
Start snipercorn:
authbind python -m snipercorn fileserver.py -b :::443 --sni ~/etc/dehydrated
Run dehydrated to get certificates:
dehydrated -f ~/etc/dehydrated/config --register --accept-terms # once dehydrated -f ~/etc/dehydrated/config -c # auto-renews when necessary
Alternate names may not work. If it doesn’t work, try just one domain in domains.txt. Remember your domain has to be reachable from the CA (letsencrypt) server on port 443.
Visit your new site.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for snipercorn-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a45b068216ab11b95c1b0c3a6227811e5d13ef900cfa71544e5a1537f3eb26a |
|
MD5 | 85d849cc5921a659df146fdebfe71970 |
|
BLAKE2b-256 | 88a0e298c8b88d49634cec46445a78662a9f73fc6911e888e9680a2be4b68f07 |