diff options
| author | Felix Hanley <felix@userspace.com.au> | 2019-12-26 12:20:05 +0000 |
|---|---|---|
| committer | Felix Hanley <felix@userspace.com.au> | 2019-12-26 12:20:05 +0000 |
| commit | 20d42b5b72f8d6d116206698ec241e04adea4359 (patch) | |
| tree | 3849525a90e433cd850ce5aa377f52826be31be7 | |
| parent | 94f6e668feb91cd333c445677cde7c8ab4d062c0 (diff) | |
| download | tinydnsdyn-20d42b5b72f8d6d116206698ec241e04adea4359.tar.gz tinydnsdyn-20d42b5b72f8d6d116206698ec241e04adea4359.tar.bz2 | |
Thanks to Tomas Astary.
| -rw-r--r-- | README.md | 8 | ||||
| -rwxr-xr-x | tinydnsdyn | 7 |
2 files changed, 9 insertions, 6 deletions
@@ -9,10 +9,10 @@ It should run on any Linux or BSD with Python installed. ## Requirements * Administrative access to a server running tinydns and hence - daemontools or similar (such as runit in Void linux) -* Administrative access to a *nix box on you local network -* Python (version 2!) installed on both client and server -* An open port on the server's firewall + daemontools or similar (such as runit in Void linux). +* Administrative access to a *nix box on you local network. +* Python (>2.7.9) installed on both client and server. +* An open port on the server's firewall. ## Installation @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python2 # Copyright 2011-2016 Felix Hanley <felix@userspace.com.au> # @@ -198,7 +198,10 @@ def main(): httpd = HTTPServer((options.address, options.port), RequestHandler) if options.certfile and options.keyfile: - httpd.socket = ssl.wrap_socket(httpd.socket, certfile=certfile, keyfile=keyfile, server_side=True) + context = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH) + context.load_cert_chain(options.certfile, options.keyfile) + httpd.socket = context.wrap_socket(httpd.socket, server_side=True) + httpd.serve_forever() |
