From 80e224e8edcc6dace9bb47163e10fbc3eb88025e Mon Sep 17 00:00:00 2001 From: Franoosh Date: Sat, 10 Jan 2026 13:03:05 +0100 Subject: Add support for zmq certificates --- router.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'router.py') diff --git a/router.py b/router.py index ce733b9..3c92826 100644 --- a/router.py +++ b/router.py @@ -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: -- cgit v1.2.3