Source: https://swgbar.com/zh-CN/guides/fortinet-forticlient-ssl-inspection-bypass-mac/
Language: zh-CN

# Mac 上的 Fortinet FortiClient 与 FortiGate（Fortinet\_CA\_SSL）检查：检测与绕过

检查 Mac 上的 Fortinet FortiGate 或 FortiClient（Fortinet\_CA\_SSL）正在执行 SSL Deep Inspection 还是仅 Certificate Inspection，并对比单域名 SWG 绕过、FortiGate 豁免与 CA 信任方案。

SWG bar · 更新日期 2026年11月24日

要确认 **Fortinet FortiGate / FortiProxy / FortiClient** 是否正在你的 Mac 上主动解密 HTTPS 流量，请打开 **SWG bar → 概览**（或运行 `swgbar overview`），查看**域名劫持占比**是否大于 `0%`，以及**中间人证书**列表中是否出现 **`Fortinet_CA_SSL`**（或贵公司自定义的 FortiGate Deep Inspection CA）。若要在获授权的 Mac 上为单个出错主机名绕过 Fortinet SSL Deep Inspection，请打开 **SWG bar → 域名**，选中该主机名并开启**绕过 SWG**（或运行 `swgbar bypass enable <domain>`）。

与纯云端托管网关不同，macOS 上的 Fortinet 环境通常将 **FortiClient VPN / ZTNA / SASE** 与 **SSL Certificate Inspection**（仅检查元数据）或完整的 **SSL Deep Inspection**（HTTPS 解密重签检查）结合部署。先分清当前生效的是哪种模式，能帮你省下数小时排查开发工具故障的时间。

## 1\. 区分 FortiGate Certificate Inspection 与 SSL Deep Inspection

*   **SSL Certificate Inspection（不解密 HTTPS）**：FortiGate 仅读取 TLS SNI 与服务器证书头部以执行 URL 过滤，源站服务器的公共证书链保持原样不变。SWG bar 显示为**公共路径**。
*   **SSL Deep Inspection（`Fortinet_CA_SSL`——主动解密 HTTPS）**：FortiGate 或 FortiSASE 终止 TLS 连接，审查解密后的载荷，再使用经 MDM 推送至 macOS 系统钥匙串的 `Fortinet_CA_SSL`（或企业下级 CA）重新签发响应。SWG bar 会将受影响域名标记为**已确认**拦截。

在终端中核验任意主机名，或使用 [SWG bar](<https://swgbar.com/zh-CN/install/>) 持续监测：

```
openssl s_client -connect api.github.com:443 -servername api.github.com </dev/null 2>/dev/null | openssl x509 -noout -issuer -subject
security find-certificate -a -c "Fortinet" /Library/Keychains/System.keychain | grep -E "alis|labl"
```

如果 `issuer=` 返回 `Fortinet_CA_SSL` 或贵公司的 FortiGate 检查 CA，而非公共 CA（DigiCert、Let’s Encrypt、Google Trust Services），即说明 Deep Inspection 已开启。你也可以把输出结果粘贴到免费的[公司 Mac SSL 自测工具](<https://swgbar.com/zh-CN/tools/work-mac-ssl-check/>)或 [TLS 报错解码器](<https://swgbar.com/zh-CN/tools/tls-error-decoder/>)进行判读。

## 2\. 为什么强杀 FortiClient 或关闭 macOS 代理设置没有用

*   **FortiClient macOS 系统扩展与 VPN 隧道**：在受管 Mac 上，FortiClient 通过其 `utun` / NetworkExtension 过滤器强制接管路由；取消勾选 Wi-Fi 的 HTTP/HTTPS 代理设置无法停止网关层的 Deep Inspection。
*   **从钥匙串删除 `Fortinet_CA_SSL` 会导致网页全挂**：取消信任该 CA 并不会关掉 FortiGate Deep Inspection——浏览器会立刻弹出 `NET::ERR_CERT_AUTHORITY_INVALID`，直到 MDM 重新安装证书描述文件。
*   **断开 FortiClient 会丢失内网访问**：停掉 FortiClient VPN/SASE 隧道后，私有 Git 服务器、内部管理面板与企业 DNS 都会一并断开。

## 3\. 在 macOS 上应对 Fortinet SSL Deep Inspection 的三种实用方案

| 方案 | 控制方 | 是否保持 FortiClient VPN 与 ZTNA 运行？ | 最适用场景 |
| --- | --- | --- | --- |
| **按域名绕过 SWG（`SWG bar`）** | 本地 Mac 用户（获授权网络中） | 是——仅将选定主机名经由 Mac 的物理`硬件网卡` IPv4 接口路由 | 无需断开 FortiClient，即刻按主机名缓解证书固定应用、mTLS、WebSocket 或异常 API 故障（详见[如何在 Mac 上绕过 SWG](<https://swgbar.com/zh-CN/guides/how-to-bypass-swg/>)） |
| **FortiGate / FortiSASE 豁免（`SSL/SSH Inspection → Exempt`）** | 企业 IT / 安全团队 | 是 | 在 **Security Profiles → SSL/SSH Inspection → Exempt from SSL Inspection** 中配置全公司永久排除（详见[SWG 绕过与 TLS 解密例外对比](<https://swgbar.com/zh-CN/guides/swg-bypass-vs-tls-exception/>)） |
| **导出并在 CLI 运行时中信任 `Fortinet_CA_SSL`** | 本地开发者 | 是（流量仍保持受检） | 策略要求保持 Deep Inspection，而 `git`、`npm`、`Python`、`Docker`、`Claude Code` 或 `Cursor` 报 `unable to get local issuer certificate` |

## 4\. 开启单域名绕过或在 CLI 工具中信任 `Fortinet_CA_SSL`

### 方案 A：使用 SWG bar 开启单域名绕过（获授权时）

1.  打开 **SWG bar → 域名**，选中出错的准确主机名（如果登录域名与 API 域名不同，请参阅[多域名 SSO、API 与 CDN 绕过指南](<https://swgbar.com/zh-CN/guides/multi-domain-sso-api-cdn-swg-bypass/>)），在**绕过 SWG**一旁点击**开启**——或运行 `swgbar bypass enable <domain>`。
2.  等待状态变为**绕过中**，重启受影响的标签页或 CLI 命令，再用 `swgbar probe <domain>` 验证返回的源站公共证书。
3.  如果企业防火墙阻断经由物理`硬件网卡` IPv4 接口的直连出站流量，运行 `swgbar bypass disable <domain>` 即可立即恢复正常的 FortiClient 路由。

### 方案 B：为 macOS CLI 与 AI 工具配置信任 `Fortinet_CA_SSL`

```
mkdir -p "$HOME/.certs"
security find-certificate -c "Fortinet" -p /Library/Keychains/System.keychain > "$HOME/.certs/fortinet-ca-ssl.pem"

export NODE_EXTRA_CA_CERTS="$HOME/.certs/fortinet-ca-ssl.pem"
export SSL_CERT_FILE="$HOME/.certs/fortinet-ca-ssl.pem"
export REQUESTS_CA_BUNDLE="$HOME/.certs/fortinet-ca-ssl.pem"
export CURL_CA_BUNDLE="$HOME/.certs/fortinet-ca-ssl.pem"
git config --global http.sslCAInfo "$HOME/.certs/fortinet-ca-ssl.pem"
```

更多针对具体运行时的配置方案，请参考[修复 Git 与 npm SSL 证书错误](<https://swgbar.com/zh-CN/guides/fix-git-npm-unable-to-get-local-issuer-certificate-mac/>)和[修复 Mac 上 Python 与 Docker SSL 报错](<https://swgbar.com/zh-CN/guides/fix-python-docker-certificate-verify-failed-x509-mac/>)。

macOS 14+ · Apple Silicon

## 别再盲猜公司 SWG 解密了哪些域名。

SWG bar 在 Mac 菜单栏实时检测 HTTPS 解密，并支持单域名一键绕过，同时保持公司 VPN 与 SSO 正常工作。

[$0 开启 14 天免费试用](<https://swgbar.com/releases/2.4.12/SWGBar-macOS-arm64.pkg>) [诊断 TLS 报错](<https://swgbar.com/zh-CN/tools/tls-error-decoder/>) [免费 Chrome 扩展](<https://chromewebstore.google.com/detail/bidclnlfneemkkdeanlcbpjfdalelmbf>)

## 继续阅读

*   [如何在 Mac 上绕过 SWG（单域名一键绕过与 CLI 命令）](<https://swgbar.com/zh-CN/guides/how-to-bypass-swg/>)
*   [如何在 Mac 上绕过 SSL 检查（企业 SWG 单域名绕过指南）](<https://swgbar.com/zh-CN/guides/bypass-ssl-inspection-mac/>)
*   [如何在 macOS 上绕过 HTTPS 与 TLS 检查（Break-and-Inspect 指南）](<https://swgbar.com/zh-CN/guides/bypass-https-tls-inspection-mac/>)
*   [如何在 Mac 上绕过企业代理与 SWG SSL 检查](<https://swgbar.com/zh-CN/guides/bypass-corporate-proxy-ssl-inspection-mac/>)
*   [如何判断我的电脑是否被 SWG 劫持（Mac 上检测 HTTPS/SSL 检查）](<https://swgbar.com/zh-CN/guides/detect-https-inspection/>)
*   [如何检查公司或办公 Mac 是否正在拦截 HTTPS（SSL 检查排查）](<https://swgbar.com/zh-CN/guides/check-if-work-mac-intercepting-https/>)
*   [公司在工作 Mac 上能看到我的浏览记录、无痕模式和个人账号吗？](<https://swgbar.com/zh-CN/guides/can-employer-see-browsing-history-incognito-work-mac/>)
*   [Mac SSL 检查检测工具：菜单栏实时侦测 HTTPS 拦截](<https://swgbar.com/zh-CN/guides/ssl-inspection-checker-mac/>)
*   [Mac 上的 Zscaler SSL 检查：如何检测并按域名绕过](<https://swgbar.com/zh-CN/guides/zscaler-ssl-inspection-bypass-mac/>)
*   [如何在 Mac 上关闭或绕过 Zscaler（当防篡改保护将其锁定时）](<https://swgbar.com/zh-CN/guides/disable-turn-off-zscaler-on-mac/>)
*   [Mac 上的 Cloudflare WARP 与 Zero Trust TLS 检查：检测与绕过](<https://swgbar.com/zh-CN/guides/cloudflare-warp-tls-inspection-mac/>)
*   [Mac 上的 Netskope SSL 检查：检测解密与单域名绕过指南](<https://swgbar.com/zh-CN/guides/netskope-ssl-inspection-bypass-mac/>)
*   [Mac 上的 Cisco Umbrella SSL 检查：检测解密并按域名绕过](<https://swgbar.com/zh-CN/guides/cisco-umbrella-ssl-inspection-bypass-mac/>)
*   [Mac 上的 Palo Alto GlobalProtect 与 Prisma Access SSL 解密：检测与绕过](<https://swgbar.com/zh-CN/guides/palo-alto-globalprotect-prisma-ssl-decryption-mac/>)
*   [修复 Mac 上 Git 与 npm 的 'unable to get local issuer certificate' / SELF\_SIGNED\_CERT\_IN\_CHAIN 报错](<https://swgbar.com/zh-CN/guides/fix-git-npm-unable-to-get-local-issuer-certificate-mac/>)
*   [修复 Mac 上 Python 'CERTIFICATE\_VERIFY\_FAILED' 与 Docker 'x509: certificate signed by unknown authority' 报错](<https://swgbar.com/zh-CN/guides/fix-python-docker-certificate-verify-failed-x509-mac/>)
*   [修复 Mac 上 GitHub Copilot、OpenAI Codex 与 Gemini CLI 的 SSL 证书错误（Zscaler / SWG）](<https://swgbar.com/zh-CN/guides/fix-codex-copilot-gemini-cli-ssl-certificate-error-mac/>)
*   [SWG bar 中的“已确认”与“疑似”HTTPS 检查状态解析](<https://swgbar.com/zh-CN/guides/confirmed-vs-suspected-https-inspection/>)
*   [在 SWG bar 中检查中间人根证书与签发机构](<https://swgbar.com/zh-CN/guides/inspect-mitm-root-certificates-macos/>)
*   [Mac 上的企业 SWG 与 MDM HTTPS 解密检查解析](<https://swgbar.com/zh-CN/guides/enterprise-swg-https-inspection-macos/>)
*   [SWG 绕过与 TLS 解密例外（Break-and-Inspect）对比](<https://swgbar.com/zh-CN/guides/swg-bypass-vs-tls-exception/>)
*   [在 Mac 上为多域名 Web 应用、SSO、CDN 与 API 配置 SWG 绕过](<https://swgbar.com/zh-CN/guides/multi-domain-sso-api-cdn-swg-bypass/>)
*   [排查 Mac 上 SWG 绕过的“恢复中”“已暂停”与连接错误](<https://swgbar.com/zh-CN/guides/troubleshoot-swg-bypass-recovering-paused-macos/>)
*   [macOS VPN 虚拟网卡与 SWG HTTPS 检查对比](<https://swgbar.com/zh-CN/guides/macos-vpn-virtual-interface-vs-swg-inspection/>)
*   [为什么证书固定（Pinning）应用与 mTLS 在 SWG 检查下会失效](<https://swgbar.com/zh-CN/guides/certificate-pinning-mtls-swg-inspection-macos/>)
*   [修复 Mac 终端 CLI 与 AI 工具中的 SWG TLS/SSL 证书错误](<https://swgbar.com/zh-CN/guides/swg-tls-certificate-errors-macos/>)
*   [Mac 在 SWG 下的 Homebrew、Docker、Python 与 Node.js CA 信任配置](<https://swgbar.com/zh-CN/guides/homebrew-docker-python-node-ca-trust-swg-macos/>)
*   [修复 Mac 上 Claude Code 与 Cursor 的 'unable to get local issuer certificate' 报错（SWG 与 MCP）](<https://swgbar.com/zh-CN/guides/ai-coding-agents-claude-code-cursor-swg-macos/>)
*   [在 Mac 上使用 openssl 与 security verify-cert 验证 TLS 证书](<https://swgbar.com/zh-CN/guides/verify-tls-certificates-openssl-security-verify-cert-macos/>)
*   [SWG bar 权限、本地隐私与 TLS 探测限额说明](<https://swgbar.com/zh-CN/guides/macos-network-extension-privacy-probe-limits/>)
*   [SWG bar 如何检查 HTTPS 解密](<https://swgbar.com/zh-CN/how-it-works/>)
*   [下载并安装 Mac 版 SWG bar（macOS 14+）](<https://swgbar.com/zh-CN/install/>)
*   [检测 SSL 与 HTTPS 检查的 Chrome 扩展（SWG bar 配套插件）](<https://swgbar.com/zh-CN/chrome-extension/>)
*   [SWG bar CLI 使用指南](<https://swgbar.com/zh-CN/cli/>)
*   [SWG bar MCP 使用指南](<https://swgbar.com/zh-CN/mcp/>)
*   [SWG bar 版本信息](<https://swgbar.com/zh-CN/releases/>)
*   [关于 SWG bar](<https://swgbar.com/zh-CN/about/>)
