Port Security for macOS  (uses the pf firewall)

REQUIREMENTS
  macOS 12 or newer (Apple Silicon or Intel) and the .NET 8 Runtime
  https://dotnet.microsoft.com/download/dotnet/8.0

INSTALL
  1. Drag PortSecurity.app to /Applications.
  2. First launch: this app is not signed or notarized, so macOS will block it.
     Either right-click the app > Open > Open, or run:
       xattr -dr com.apple.quarantine /Applications/PortSecurity.app
  3. Open it, enter your administrator password, then enter your license key.

HOW IT WORKS
  - The launcher starts a small local service as root (needed for pfctl) that listens only on
    127.0.0.1 with a one-time token, and opens its window in your browser (Chrome/Edge/Brave in
    app mode if installed, otherwise your default browser). Closing the window stops the service.
  - Licensing is the same as the Windows/Linux builds: your key is checked against the license server,
    the reply is RSA-signed, and a signed cached copy is accepted when offline.
  - Rules live in the pf anchor "com.portsecurity". The app loads a copy of /etc/pf.conf with one
    extra "anchor" line; /etc/pf.conf itself is never modified.
  - Tick "Re-apply my blocked ports at startup" to install a LaunchDaemon that restores your rules
    at boot (it needs a previously activated, unexpired license).
  - Blocked attempts are captured live from pflog0 while the app is open.

REBUILD FROM SOURCE (on any machine with the .NET 8 SDK)
  cd src && dotnet build -c Release
  The same build also runs on Linux:  sudo dotnet portsecurity.dll
