Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

snipercorn-0.0.1-py2.py3-none-any.whl (6.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file snipercorn-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: snipercorn-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for snipercorn-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8a45b068216ab11b95c1b0c3a6227811e5d13ef900cfa71544e5a1537f3eb26a
MD5 85d849cc5921a659df146fdebfe71970
BLAKE2b-256 88a0e298c8b88d49634cec46445a78662a9f73fc6911e888e9680a2be4b68f07

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page