Skip to content

fix: the cast help on Windows gives firewall commands to copy, like Linux - #34

Merged
gridoe merged 1 commit into
mainfrom
fix/windows-cast-firewall-help
Nov 17, 2026
Merged

gridoe merged 1 commit into
mainfrom
fix/windows-cast-firewall-help

Conversation

@gridoe

@gridoe gridoe commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

On Windows a phone could not find refryt in its Cast menu. The cast receiver itself was fine (it answers a DIAL search sent from the same machine), but Windows Firewall dropped the phone's discovery searches before they reached the app: pktmon showed each M-SEARCH from the phone dropped with "INET: receive inspection". There was no rule for refryt at all, and the network was one Windows calls Public, which a rule for private networks (what the help told people to allow) would not cover anyway.

The ? beside the cast setting now gives Windows the same kind of copyable commands Linux has for ufw and firewalld: two New-NetFirewallRule lines, UDP 1900 for discovery and the pairing port over TCP, for this exe, from the network's private range, to run in PowerShell as administrator. The README's Windows line says the same.

The range is written out rather than using LocalSubnet. With a LocalSubnet rule the phone's searches were still dropped; with the range written out (192.168.10.0/24) the phone found the computer and cast to it.

Tested on Windows 11 with an iPhone: with no rule the computer was not found; with a rule for the exe from 192.168.10.0/24 (netsh, all ports) it was found and casting worked. The two commands in the help (port-scoped, 192.168.0.0/16) were reviewed in the app but not yet run.

…inux

A phone could not find refryt on Windows: Windows Firewall dropped its
discovery searches before they reached the app. The help counted on
Windows' "allow access" prompt and said to allow private networks, but the
prompt may never leave a rule, and a network Windows calls Public, the
default, is not covered by one for private networks.

The ? beside the cast setting now gives two New-NetFirewallRule commands
with a Copy button, as it does for ufw and firewalld: UDP 1900 for
discovery and the pairing port, for this exe, from this network's private
range. The range is written out instead of LocalSubnet, since with that
keyword the phone's searches were still dropped in testing. The README says
the same.
@gridoe
gridoe merged commit 694d6e5 into main Nov 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant