# iOS 真机

> 使用 Proxyman 在 Mac 上抓包 iPhone 和 iPad 的 HTTP/HTTPS 流量：设置 Wi-Fi 代理，然后在设备上安装并信任 Proxyman 证书。

要抓取 iPhone 或 iPad 的流量，需要将其 Wi-Fi 流量通过电脑上的 Proxyman 转发。进行 HTTPS 解密还需要在设备上安装 Proxyman 证书，并明确信任该证书。这是两个独立的步骤。

保持 Proxyman 运行，并将设备连接到能够访问你电脑的网络。请使用设置指南中显示的电脑 IP 地址和 Proxyman 端口，而不是设备的 IP 地址。

在 Proxyman 中打开真机设置指南：

* **Certificate** **菜单** -> **Install Certificate on iOS -> Physical Devices...**

> **提示:** 此设置指南适用于所有真机，包括 iPhone、iPad、Apple Watch、Apple TV 和 Apple Vision Pro。

## iOS 设置指南 {#ios-setup-guide}

![Proxyman iOS 设置指南，显示 Wi-Fi 代理服务器和端口、proxy.man/ssl 链接，以及安装和信任步骤](https://proxyman.com/docs/assets/proxyman-ios-setup-guide.jpg)

_真机 iOS 设置指南_

按照以下步骤操作：

1. 在 Mac 上安装 **Root Proxyman Certificate**：可参考 [macOS 指南](https://proxyman.com/docs/zh-cn/debug-devices/macos)。
2. 在 iOS 设备上，打开 Settings app -> Wi-Fi -> 选择当前 Wi-Fi 网络 -> 按下表中的值配置 HTTP Proxy。

| 名称           | 值                                                |
| -------------- | ------------------------------------------------- |
| Server IP      | 你的 Mac 当前的 IP 地址                           |
| Port           | Proxyman 的当前端口，默认为 9090                  |
| Authentication | 否                                                |

> **备注:** 如果你在 macOS 或 iOS 设备上使用**任何 VPN 应用**，请将其全部关闭，因为它们会与 HTTP Proxy 配置冲突。

  3\. 在 iOS 设备上的 **Safari 隐私浏览标签页**中打开 [http://proxy.man/ssl](http://proxy.man/ssl) 或 [http://cert.proxyman.io](http://cert.proxyman.io/)，下载 Proxyman 证书。

> **备注:** **http://proxy.man/ssl** 和 **http://cert.proxyman.io** 是本地网站，由 Proxyman 内置的 HTTP 服务器提供。如果无法打开它们，请忘记该 Wi-Fi 网络并重新连接，同时确保 Proxyman 应用已打开。
>
> 如果仍然无法访问，请在 [Proxyman GitHub 仓库](https://github.com/ProxymanApp/Proxyman)中提交支持工单。

    4\. 从 iOS 10.3 起，必须在 Settings app 中显式安装并信任 Proxyman CA。

#### **安装 Proxyman CA** {#install-proxyman-ca}

* **iOS ≥ 12.2**：在 iPhone 上 -> 打开 Settings app > Profile Downloaded > 选择 Proxyman CA > Install

#### 信任 Proxyman CA {#trust-proxyman-ca}

仅安装描述文件并不能完全信任证书。在测试 HTTPS 流量之前，请完成此步骤：

* Settings app > General > About > Certificate Trust Settings > 将 Proxyman CA 的开关打开。

![Proxyman CA 的 iOS 安装描述文件界面，以及已打开的证书信任设置开关](https://proxyman.com/docs/assets/install_and_trust_proxyman_certificate.png)

> **备注:** 请确保在 iOS 设备上**安装**并**信任** Proxyman CA。如果遇到任何问题，请发送邮件至 **support@proxyman.com**，或在 [**GitHub**](https://github.com/ProxymanApp/Proxyman) 上提交 issue。

> **备注:** 设置完成后，为该域名启用 [SSL Proxying](https://proxyman.com/docs/zh-cn/basic-features/ssl-proxying) 并发起新请求。如果没有显示任何流量，请使用[设备连接故障排除指南](https://proxyman.com/docs/zh-cn/troubleshooting/my-ios-devices-couldnt-connect-to-proxyman-via-proxy)检查 Wi-Fi 代理的 IP 和端口、网络连接以及 VPN 设置。如果请求能够显示但 HTTPS 失败，请重新检查证书的安装和信任情况。

> **备注:** 不使用 Proxyman 调试时，请务必**删除 iPhone 上的证书**。否则，你的 HTTP/HTTPS 请求可能会被拦截，导致敏感数据泄露。

## 教程 {#tutorial}

参阅详细步骤，了解如何使用 Proxyman [调试 iOS 设备上的应用](https://proxyman.com/posts/2019-06-16-How-I-use-Proxyman-to-see-HTTP-requests-responses-on-my-iPhone)。

### 厌倦了手动配置？ {#tired-of-manual-config}

手动覆盖 HTTP 代理，以及安装和信任 Proxyman 证书，确实很麻烦。请了解 Atlantis，这是一个原生 iOS 框架，可以自动为你完成这些操作。

- [iOS 上的 Atlantis](https://proxyman.com/docs/zh-cn/atlantis/atlantis-for-ios)

## Flutter 应用？ {#flutter-app}

如果你的应用是 Flutter 应用，你可能无法在 Proxyman 中看到网络流量。

Flutter 不使用系统级代理，因此其请求不会发送到 Proxyman。要解决此问题，你需要在代码中配置 HTTP 客户端使用代理。代码示例请参阅 [Flutter 指南](https://proxyman.com/docs/zh-cn/debug-devices/flutter)。

你也可以参考 [https://flutterigniter.com/debugging-network-requests/](https://flutterigniter.com/debugging-network-requests/) 中的 “Getting Charles to work with Flutter” 方案。

要查找本机 IP，请进入 Certificate 菜单 -> Install Certificate on iOS -> Physical Devices…，即可获取 Server IP 和 Port。

## 了解更多 {#learn-more}

* [如何在 iOS 26 或 iPadOS 26 上抓取 iPhone 的 HTTP/HTTPS 流量](https://proxyman.com/posts/how-to-capture-https-iOS-26-update-2025)
* [如何通过公司 VPN 抓取 iOS 应用的 HTTPS 流量](https://proxyman.com/posts/capture-https-ios-app-with-company-vpn)
* [使用 Proxyman 抓取 iPhone 和 iPad 的 HTTPS 流量](https://proxyman.com/iphone-device)（Proxyman 官网）
