aboutsummaryrefslogtreecommitdiff
path: root/router.py
diff options
context:
space:
mode:
authorFranoosh <uinarf@autistici.org>2026-01-10 13:03:05 +0100
committerFranoosh <uinarf@autistici.org>2026-01-10 13:03:05 +0100
commit80e224e8edcc6dace9bb47163e10fbc3eb88025e (patch)
treefb317b184401c8780c75f898ad03d9429fe74d5f /router.py
parent75fadd788a22e9fada10dd99ea4e63730b650d64 (diff)
downloadZeroMQ_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.py7
1 files changed, 6 insertions, 1 deletions
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: