一款 macOS 原生的网络诊断与一键修复工具,离线可用,专注本地网络配置故障排查(类似火绒「断网修复」)。/ A native macOS network diagnostics & one-click repair tool. Works offline, focused on local network configuration troubleshooting (inspired by Huorong's "断网修复").
作者 Author:banqiu 许可证 License:MIT(详见 LICENSE)。可自由使用、修改与再分发,须保留版权与许可声明。
下载最新版 / Download · 问题反馈 / Issues
- 启动即显网络状态卡片:Wi‑Fi 名称(SSID)、连接类型图标、接口、IP / 子网 / MAC / DNS / 网关一目了然。
- 一键诊断常见联网故障:网卡状态、本机 IP、DHCP 服务、WiFi 代理、代理环境变量、网关连通、DNS 解析、外网连通(国内 / 境外两层)、网络丢包。
- 外网连通分国内(apple.com / qq.com)与境外(google.com)两层判定:国内通但境外不通 → 一眼看出是代理 / VPN 通道失效。
- 「微信能上、网页打不开?」自动点名是 DNS 解析故障 还是 系统代理失效,并直接给出一键修复。
- 一键修复走系统原生命令(networksetup / ipconfig / dscacheutil):关闭失效代理回退直连、刷新 DNS、重置 DHCP 续租、Wi‑Fi 电源循环等。
- 所有修复点击「立即修复」时弹系统密码框,需管理员授权;所执行命令在诊断日志中透明可见。
- 原生 Swift / AppKit 单文件 App,拖入「应用程序」即用,首启自动注册开机自启(LaunchAgent),无依赖脚本。
- 在 Releases 下载对应系统的 DMG(见下方「macOS 版本选择」)。
- 打开 DMG,把
NetFix.app拖入「应用程序」。 - 首次打开:右键 → 打开(或终端执行
xattr -dr com.apple.quarantine /Applications/NetFix.app)。 - 点击「开始诊断」,等待结果;若有问题,点击「立即修复」并输入管理员密码。
从源码构建(需 macOS 11+ 与 Swift 工具链):
swiftc -O -target arm64-apple-macosx11.0 -framework Cocoa NetCore.swift main.swift -o NetFix.app/Contents/MacOS/NetFix
codesign --force --deep --sign - NetFix.app打包 DMG(需 dmgbuild):
python3 -m dmgbuild -s dmgbuild_settings.py -D basedir="$(pwd)" "NetFix" "11.0-NetFix-1.2.4-universal.dmg"- Apple Silicon(M1 及更新)— 推荐:下载
11.0-NetFix-1.2.4-universal.dmg(同时包含 arm64 + x86_64,macOS 11.0+ 通用)。 - 仅 Apple Silicon、要最小体积:下载
15.0-NetFix-1.2.4-arm64.dmg(纯 arm64,macOS 15.0+)。 - Intel Mac(含 10.15 老机器):下载
10.15-NetFix-1.2.4-x86_64.dmg(纯 x86_64,macOS 10.15+)。
三档 DMG 均为 ad-hoc 签名、未公证(notarized),首次打开请右键「打开」放行 Gatekeeper;在 Apple Silicon 上 Intel 版需通过 Rosetta 2 运行。各档均由同一套源码经
-target注入构建,源码零改动。
仓库「发行版 / Releases」的命名格式为:
支持最低版本-NetFix-版本-架构(如11.0-NetFix-1.2.4-universal.dmg)。
| 类别 | 检测项 | 说明 |
|---|---|---|
| 硬件 | 网卡状态 | 检查网卡是否启用 / 已连接(Wi‑Fi 是否开启) |
| 地址 | 本机 IP | 检测是否成功获取到 IP 地址 |
| 地址 | DHCP 服务 | 是否通过 DHCP 获取地址,或当前为静态 IP |
| 代理 | WiFi 代理 | 当前 WiFi 的系统代理是否可用、能否真正把流量带出外网 |
| 代理 | 代理环境变量 | 检查 HTTP_PROXY / HTTPS_PROXY 等环境变量 |
| 连通 | 网关连通 | 默认网关是否可达 |
| 连通 | DNS 解析 | 真实域名解析是否成功(超时即判失败) |
| 连通 | 外网连通(国内) | apple.com / qq.com 是否可达 |
| 连通 | 外网连通(境外) | google.com 是否可达(经代理 / 隧道) |
| 质量 | 网络丢包 | ping 公网地址的丢包率 |
- 🧰 图形化一键修复,告别命令行:把「敲多条命令、记一堆参数」的排障过程,浓缩成一个按钮。看不懂终端?没关系,点一下就行。
- 🌐 国内 / 境外外网分层判定:一眼区分是「本地配置问题」还是「代理 / VPN 通道失效」——微信能上、网页打不开,立刻定位根因。
- 🔌 代理失效精准识别:系统代理端口明明在监听,却把流量带不出去?它能识别这种「假通」,并一键关代理回退直连。
- 🔒 全本地、零上传:诊断与修复都在你的 Mac 上完成,不依赖云端、不联网也能跑(除连通性测试本身)。你的网络拓扑不外传。
- 📦 原生单文件 App,零依赖:拖入「应用程序」即用,首启自动注册开机自启;没有 install 脚本、没有常驻后台进程、不污染系统。
- 🪟 修复过程透明可审计:每步执行的系统命令都打印在诊断日志里;只有点「立即修复」才弹密码框,授权完全由你掌控。
- 💻 一份源码,覆盖 Apple Silicon 与 Intel:从 macOS 10.15 老机器到 15 最新系统,三档 DMG 任选。
- 在 macOS 15 且为 ad-hoc 签名时,系统对第三方 App 读取 Wi‑Fi 名称(SSID)有隐私限制,状态卡片可能显示「Wi‑Fi 已连接,但无法读取名称」。这是系统权限限制,并非故障;授予「定位」权限、或使用经 Developer ID 签名 + 公证的版本后可正常显示(详见 Issues)。
- 诊断与修复仅覆盖本地网络配置类故障(代理 / 网关 / DNS / DHCP);外部链路中断(运营商、远端服务器)属环境状态,不在可修复范围内。
- Live network status card on launch: Wi‑Fi name (SSID), connection-type icon, interface, IP / subnet / MAC / DNS / gateway at a glance.
- One-click diagnosis of common faults: network hardware, local IP, DHCP, Wi‑Fi proxy, proxy env vars, gateway, DNS, internet reachability (domestic / overseas tiers), packet loss.
- Internet reachability is split into domestic (apple.com / qq.com) and overseas (google.com) tiers: domestic works but overseas fails → it's obviously a broken proxy / VPN tunnel.
- "WeChat works but web pages don't?" — automatically pinpoints whether it's a DNS resolution fault or a system proxy failure, then offers one-click repair.
- One-click repair uses native system commands (networksetup / ipconfig / dscacheutil): disable dead proxy → fall back to direct, flush DNS, renew DHCP, Wi‑Fi power cycle, and more.
- All repairs show the system password prompt and require admin authorization; executed commands are transparent in the diagnostic log.
- Native Swift / AppKit single-file app — drag into Applications and it just works; auto-registers a LaunchAgent on first launch, no helper scripts.
- Download the DMG for your system from Releases (see "Choose a macOS build" below).
- Open the DMG and drag
NetFix.appinto Applications. - First launch: right-click → Open (or run
xattr -dr com.apple.quarantine /Applications/NetFix.appin Terminal). - Click "开始诊断 / Diagnose", wait for results; if issues are found, click "立即修复 / Repair" and enter your admin password.
Build from source (requires macOS 11+ and the Swift toolchain):
swiftc -O -target arm64-apple-macosx11.0 -framework Cocoa NetCore.swift main.swift -o NetFix.app/Contents/MacOS/NetFix
codesign --force --deep --sign - NetFix.appBuild the DMG (requires dmgbuild):
python3 -m dmgbuild -s dmgbuild_settings.py -D basedir="$(pwd)" "NetFix" "11.0-NetFix-1.2.4-universal.dmg"- Apple Silicon (M1 or newer) — recommended: use
11.0-NetFix-1.2.4-universal.dmg(contains both arm64 + x86_64, universal, macOS 11.0+). - Apple Silicon only, smallest size: use
15.0-NetFix-1.2.4-arm64.dmg(arm64 only, macOS 15.0+). - Intel Mac (including old 10.15 machines): use
10.15-NetFix-1.2.4-x86_64.dmg(x86_64 only, macOS 10.15+).
All three DMGs are ad-hoc signed and not notarized; right-click "Open" on first launch to bypass Gatekeeper. The Intel build runs on Apple Silicon via Rosetta 2. Each build comes from the same source via
-targetinjection — zero source changes.
Release asset naming:
min-version-NetFix-version-arch(e.g.11.0-NetFix-1.2.4-universal.dmg).
| Category | Check | Description |
|---|---|---|
| Hardware | Network adapter | Checks whether the adapter is enabled / connected (Wi‑Fi powered on) |
| Address | Local IP | Checks whether an IP address was obtained |
| Address | DHCP service | Whether address came from DHCP, or currently a static IP |
| Proxy | Wi‑Fi proxy | Whether the current Wi‑Fi system proxy is usable and can actually carry traffic out |
| Proxy | Proxy env vars | Checks HTTP_PROXY / HTTPS_PROXY and similar env vars |
| Connectivity | Gateway | Default gateway reachable |
| Connectivity | DNS resolution | Real domain resolution succeeds (timeout = failure) |
| Connectivity | Internet (domestic) | apple.com / qq.com reachable |
| Connectivity | Internet (overseas) | google.com reachable (via proxy / tunnel) |
| Quality | Packet loss | Packet loss rate to a public ping target |
- 🧰 GUI one-click repair, no terminal needed: collapses the "type many commands, remember many flags" troubleshooting into a single button. Can't read Terminal? No problem — just click.
- 🌐 Domestic / overseas internet tiers: at a glance tells whether it's a local config issue or a broken proxy / VPN tunnel. WeChat works but web doesn't? The root cause is pinned instantly.
- 🔌 Detects fake-working proxies: the system proxy port is listening but can't carry traffic out? It spots this "looks-fine-but-dead" state and falls back to direct connection with one click.
- 🔒 Fully local, zero upload: diagnosis and repair run entirely on your Mac — no cloud dependency, works offline (except the reachability test itself). Your network topology never leaves the machine.
- 📦 Native single-file app, zero dependencies: drag into Applications and it just works; auto-registers a LaunchAgent on first launch. No install scripts, no background daemons, nothing pollutes your system.
- 🪟 Transparent, auditable repairs: every system command executed is printed in the diagnostic log. The password prompt appears only when you click "Repair" — authorization stays in your hands.
- 💻 One codebase, Apple Silicon + Intel: from old macOS 10.15 machines to the latest 15, pick among three DMG builds.
- On macOS 15 with an ad-hoc signature, the system restricts third-party apps from reading the Wi‑Fi name (SSID); the status card may show "Wi‑Fi connected, but name unreadable". This is a system privacy limitation, not a fault — granting Location permission or using a Developer ID signed + notarized build resolves it (see Issues).
- Diagnosis and repair cover local network configuration faults only (proxy / gateway / DNS / DHCP); an upstream outage (ISP, remote server) is an environmental state and out of repair scope.
- 纯本地运行,不上传任何网络数据;所有诊断与修复均在你的 Mac 上完成。
- 修复操作需管理员密码(
osascript with administrator privileges),所执行的命令在日志中透明可见。 - 应用未公证(notarized),请仅从你信任的来源获取,并在首次打开时右键放行。
MIT License — 版权归 banqiu 所有(2026)。
- 允许个人与商业免费使用、修改、再分发,须保留版权与许可声明。
- 完整条款见 LICENSE。
NetFix 是一款免费开源工具,基于 MIT 许可发布,离线、无广告。如果你觉得好用,欢迎在 GitHub 上点个 Star,或反馈问题 / 提交 PR 帮它变得更好 —— 纯自愿。 This tool is free, open-source, and ad-free. If it helps you, a GitHub Star or an issue/PR is warmly welcome — entirely optional.