Show HN: Auto Dismiss Mac OS "Allow <app> to find devices on local networks?"

Hacker News Top Tools

Summary

Show HN 介绍开源工具 dontallow,一个用 Swift 编写的 macOS 代理,可自动点击拒绝反复出现的"允许应用在本地网络中查找设备"提示,并支持暂停、允许列表和规则解码等功能。

This popup has been a constant gripe of mine for years. I almost NEVER want to allow this permission and there is no system setting to disable it globally and prevent the popup from interrupting your typing, etc. This tiny swift app I built will autoclose it in 1&#x2F;4th of a second and leave behind a little notification that it did so. Would love to hear feedback!
Original Article
View Cached Full Text

Cached at: 10/30/26, 03:10 AM

johncassil/dontallow

Source: https://github.com/johncassil/dontallow

dontallow

Auto-dismisses the macOS prompt:

Allow “Google Chrome” to find devices on local networks? This will allow the app to discover, connect to, and collect data from devices on your networks.

It presses Don’t Allow for you, within a fraction of a second, every time. Zero CPU while idle. Survives reboots. Two short Swift files, no dependencies.

Why this exists

macOS (Sequoia and later) shows this prompt the first time an app touches the local network. The decision is supposed to be remembered. For many apps it isn’t, so the prompt comes back on every launch, often for apps you aren’t even using:

  • Chromium browsers (Chrome, Brave, Edge, Island, Arc) copy their own app bundle into a random temp folder at launch so the code signature survives in-place updates. macOS keys the Local Network decision to that random path, so the next launch looks like a brand-new app. Your Privacy settings fill up with duplicate “Google Chrome.app” rows that no longer point at anything.
  • Apps with versioned install paths (anything that installs into .../versions/1.2.3/) get a new row per update.
  • Misattributed prompts. macOS pins the dialog on whichever app it decides is “responsible”, so you’ll see prompts for apps that aren’t running.
  • Some apps do legitimately use this permission: Chromecast and AirPlay discovery in browsers and media players, LAN multiplayer in games, printer and scanner utilities. If you use one of those features, answer Allow for that app (dontallow pause 10m while you do), and it’s remembered as long as the app’s path is stable. If you never use them, you never need to be asked.

There is no supported way to prune the list, no MDM payload to pre-deny the permission, and tccutil reset doesn’t cover it. So: a small agent that answers “no” for you.

Install

brew install johncassil/tap/dontallow   # or: make && make install
dontallow install

dontallow install writes a per-user launchd agent, starts it, opens System Settings > Privacy & Security > Accessibility, and prints the exact path to add if macOS doesn’t prompt you. Accessibility is the permission that lets it press the button. It waits for the grant and confirms when the agent is active. dontallow status repeats the instructions any time the grant is missing.

Use

CommandWhat it does
dontallow statusAgent state, pause state, allowlist, recent dismissals
dontallow pause [1h]Leave prompts alone for a while (30m, 2h, 1d, forever)
dontallow resumeDismiss again
dontallow rulesDecode the system’s Local Network rule store and show what each Privacy row really is, including orphans
dontallow uninstallStop and remove the agent
dontallow run --dry-runForeground, log what it would do, press nothing

Each dismissal posts a notification naming the app and the pause command, so you never have to remember how to turn it off. Mute the notification in System Settings if you’d rather not see it.

When an app really does need local network access

Three options, pick whichever fits:

  • dontallow pause 10m, then launch the app and click Allow yourself.
  • Add the app’s name to ~/.config/dontallow/allowlist (one per line, case-insensitive substring). Prompts for it are never touched.
  • Flip the toggle in System Settings > Privacy & Security > Local Network. A dismissed prompt records a deny, which you can reverse there.

Set ~/.config/dontallow/grace to a number of seconds if you want a window to click Allow before the agent does (default 0.25).

How it works

The prompt is a window owned by the system process UserNotificationCenter. dontallow registers an Accessibility observer for window creation on that process and sleeps until one fires. It reads the dialog text, confirms it’s a local network prompt and not something else, checks pause and allowlist, and performs the Accessibility press action on the Don’t Allow button. If the press is refused it falls back to a synthetic click at the button’s location.

It never modifies system files, never disables protections, and never chooses Allow.

Managed Macs

Local Network cannot be pre-set by MDM, but Accessibility can. For a fleet: build once, sign with a Developer ID, ship the binary plus a PPPC (Privacy Preferences Policy Control) profile granting Accessibility to its code requirement, and run dontallow install per user. No manual Settings step.

After upgrading

macOS keys the Accessibility grant to the binary’s code signature, and every build (including brew upgrade) produces a new one. After an upgrade run dontallow status. If it says the grant is missing, remove the dontallow row in Accessibility settings and add it back from the path it prints. The agent re-attaches on its own within ten seconds. A future release signed with a Developer ID will remove this step.

Tests

make test

Unit tests cover the pure logic (dialog text parsing, duration and pause parsing, allowlist matching, launchd plist generation, and the Local Network rule decoder against a fixture archive). They build with plain swiftc and need no Xcode or SwiftPM. The end-to-end path (a real prompt, a real press) can only be checked on a Mac with Accessibility granted; the manual recipe is in Tests/INTEGRATION.md.

Compatibility

  • Builds with Apple’s Command Line Tools alone. Xcode is not required.
  • Apple Silicon and Intel: Homebrew compiles natively on each.
  • macOS 13 or later to build; the prompt itself only exists on macOS 15 Sequoia and later.
  • Tested so far: Intel, macOS 26.6. Reports from other versions welcome.
  • English-localized macOS only for now. The matcher keys on the dialog text and the “Don’t Allow” button title; localized strings are planned.

License

MIT

Similar Articles

Show HN: A simple to-do app for iPhone, Mac, and your agent

Hacker News Top

Show HN: Nagare 是一款面向 iPhone 和 Mac 的待办事项应用,将日历事件与任务统一为同一条有序列表,并通过 MCP 将用户数据同步给 AI 助手,让代理能主动根据计划提供帮助。

@Manorgw: Tired of setting up a proxy on every single device? OpenSurge for Mac might save you all that work. It can turn your Mac into a transparent proxy gateway on your local network. Once phones, TVs, game consoles, and other devices connect, you generally won’t need to fiddle with them one by one. ① Side router, DHCP takeover, separate downstream LAN, …

X AI KOLs Timeline

OpenSurge for Mac turns your Mac into a transparent proxy gateway for your local network, supporting three modes: side router, DHCP takeover, and a separate downstream LAN. It can directly import Mihomo configurations and subscriptions, and includes a Web GUI for managing each device’s traffic routing rules, saving you the hassle of configuring proxies on individual devices.

Assist

Product Hunt

Assist 是一款在 Product Hunt 上发布的 macOS 会议助手,隐藏在 MacBook 刘海区域,可监听会议并实时建议回复,在屏幕共享时不可见,并支持完全在本地 Mac 上运行以保护隐私。