summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node')
-rw-r--r--packages/meshbay-node/tests/test_packaging_win.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/meshbay-node/tests/test_packaging_win.py b/packages/meshbay-node/tests/test_packaging_win.py
index 47a2842..ba3568c 100644
--- a/packages/meshbay-node/tests/test_packaging_win.py
+++ b/packages/meshbay-node/tests/test_packaging_win.py
@@ -221,6 +221,30 @@ def test_firewall_ps1_targets_both_executables_and_is_idempotent():
assert src.index("Remove-NetFirewallRule") < src.index("New-NetFirewallRule")
+def test_firewall_ps1_also_covers_lan_casting():
+ """
+ The WebRTC rules only reach MeshBay.exe / meshbay-node.exe; the cast HTTP
+ relay (src/cast-relay.js, fixed TCP 19550-19553) and mDNS device discovery
+ (src/cast-chromecast.js, bonjour-service, UDP 5353) are a separate surface
+ on the client alone, and need their own ports and protocols. Ports here
+ must agree with cast-relay.js's own constants and with the Linux
+ definitions in packaging/firewall/*/meshbay-cast.xml — three descriptions
+ of one port range that must not drift apart.
+ """
+ src = (ROOT / "packaging" / "win" / "firewall.ps1").read_text(encoding="utf-8")
+ assert "19550-19553" in src, "cast TCP range missing or does not match cast-relay.js"
+ assert '"5353"' in src, "mDNS discovery port (UDP 5353) missing"
+
+ relay = (CLIENT / "src" / "cast-relay.js").read_text(encoding="utf-8")
+ assert "PORT_BASE = 19550" in relay and "PORT_COUNT = 4" in relay, (
+ "cast-relay.js's port range changed — update firewall.ps1 to match")
+
+ firewalld = (ROOT / "packaging" / "firewall" / "firewalld" / "meshbay-cast.xml").read_text(
+ encoding="utf-8")
+ assert "19550-19553" in firewalld and "5353" in firewalld, (
+ "the Linux and Windows cast firewall definitions have drifted apart")
+
+
def test_the_bundled_daemon_goes_on_the_user_path_and_comes_back_off():
"""
The installer has no console entry point of its own; without this the