Expand description
agentmux.exe --configure-lan-firewall and --remove-lan-firewall: the one elevated step that lets other computers
reach AgentMux on Windows (docs/specs/SPEC_LAN_FIREWALL_SETUP_2026_10_01.md 4.1).
Started by a person’s first LAN enable, the installer’s “Allow LAN access” task and the uninstaller. It reads the
firewall without elevation, and asks Windows for administrator permission only when something has to change, so a
machine that is already set up sees no prompt. What the rules are, and what to change to reach them, is
agentmux_common::lan_firewall_rules; this module reads the machine, applies the plan and says how it went in its
exit code.
Constants§
- CONFIGURE_
FLAG - The flag, and the exit codes the helper says how it went with, are shared with the server, which runs the helper when
the person asks for the setup.
The flag that starts the helper (
agentmux.exe --configure-lan-firewall): the launcher answers it, and the server runs it when the person asks for the setup. - ELEVATED_
FLAG - Given to the copy this one starts with administrator permission, so that copy never asks again.
- EXIT_
CANCELLED - The flag, and the exit codes the helper says how it went with, are shared with the server, which runs the helper when
the person asks for the setup.
The administrator answered no to Windows’ prompt (
ERROR_CANCELLED). - EXIT_
FAILED - The flag, and the exit codes the helper says how it went with, are shared with the server, which runs the helper when the person asks for the setup. Anything else; the reason is on stderr.
- EXIT_
MANAGED - The flag, and the exit codes the helper says how it went with, are shared with the server, which runs the helper when the person asks for the setup. A policy decides the firewall’s rules: local rules are ignored, so nothing the helper does can help.
- EXIT_OK
- The flag, and the exit codes the helper says how it went with, are shared with the server, which runs the helper when the person asks for the setup. The helper’s exit codes, which is how it says how it went. The rules are as asked, or were already.
- EXIT_
UNVERIFIED - The flag, and the exit codes the helper says how it went with, are shared with the server, which runs the helper when the person asks for the setup. The rules are as asked, but some of the firewall’s rules could not be read, so it cannot be said that none of them blocks AgentMux (or, when removing, is one of ours). Not a success: the count is on stderr.
- REMOVE_
FLAG - Remove the two port rules (the uninstaller).
Functions§
- requested_
mode 🔒 - The mode the arguments ask for, if either flag is there. Configure wins when both are.
- run 🔒
- run_
if_ requested - Run the helper when
argsask for it, and give its exit code.Nonewhen they do not.