fix: harden relay service deploy

This commit is contained in:
Андрей Бобырев
2026-06-05 18:03:41 +03:00
parent ca92735c55
commit 10016c4fa4
3 changed files with 7 additions and 2 deletions

3
app.py
View File

@@ -694,6 +694,9 @@ def get_public_ipv4() -> str:
def detect_relay_firewall():
if shutil.which("nft"):
code, _, err = run_cmd(["nft", "list", "ruleset"], timeout=5)
if code == 0 and "managed by iptables-nft" in (err or "") and shutil.which("iptables"):
return "iptables"
return "nftables"
if shutil.which("iptables"):
return "iptables"