From 361aebf877a377b2f6799ec3adac73e60694f149 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 13 Apr 2025 16:38:29 +0000 Subject: [PATCH] warn on zeroconf with uds-only --- copyparty/svchub.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/copyparty/svchub.py b/copyparty/svchub.py index d0d4de6f..6dcc9fd3 100644 --- a/copyparty/svchub.py +++ b/copyparty/svchub.py @@ -770,6 +770,7 @@ class SvcHub(object): self.log("optional-dependencies", t, 6) def _check_env(self) -> None: + al = self.args try: files = os.listdir(E.cfg) except: @@ -786,6 +787,21 @@ class SvcHub(object): if self.args.bauth_last: self.log("root", "WARNING: ignoring --bauth-last due to --no-bauth", 3) + have_tcp = False + for zs in al.i: + if not zs.startswith("unix:"): + have_tcp = True + if not have_tcp: + zb = False + zs = "z zm zm4 zm6 zmv zmvv zs zsv zv" + for zs in zs.split(): + if getattr(al, zs, False): + setattr(al, zs, False) + zb = True + if zb: + t = "only listening on unix-sockets; cannot enable zeroconf/mdns/ssdp as requested" + self.log("root", t, 3) + if not self.args.no_dav: from .dxml import DXML_OK