diff options
| author | Franoosh <uinarf@autistici.org> | 2026-01-10 13:03:05 +0100 |
|---|---|---|
| committer | Franoosh <uinarf@autistici.org> | 2026-01-10 13:03:05 +0100 |
| commit | 80e224e8edcc6dace9bb47163e10fbc3eb88025e (patch) | |
| tree | fb317b184401c8780c75f898ad03d9429fe74d5f /router.py | |
| parent | 75fadd788a22e9fada10dd99ea4e63730b650d64 (diff) | |
| download | ZeroMQ_Video_Streaming-80e224e8edcc6dace9bb47163e10fbc3eb88025e.tar.gz ZeroMQ_Video_Streaming-80e224e8edcc6dace9bb47163e10fbc3eb88025e.tar.bz2 ZeroMQ_Video_Streaming-80e224e8edcc6dace9bb47163e10fbc3eb88025e.zip | |
Add support for zmq certificates
Diffstat (limited to 'router.py')
| -rw-r--r-- | router.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -15,7 +15,10 @@ import random from collections import defaultdict, deque import zmq -from helpers import CustomLoggingFormatter +from helpers import ( + CustomLoggingFormatter, + auth_service, +) # TODO: add configparser @@ -38,6 +41,7 @@ if not os.path.exists(LOGDID): BASENAME = f"{os.path.splitext(os.path.basename(__file__))[0]}" LOGFILE = os.path.join(LOGDID, f"{BASENAME}.log") LOGLEVEL = logging.INFO +CERTIFICATE_DIRECTORY = 'certs' log_formatter = CustomLoggingFormatter() handler = logging.FileHandler(LOGFILE, encoding='utf-8', mode='a') @@ -67,6 +71,7 @@ def custom_proxy() -> None: None """ context = zmq.Context.instance() + auth_service(context, CERTIFICATE_DIRECTORY) poller = zmq.Poller() # Set up frontend: |
