# SSL Proxying

> 在 Proxyman 中设置 SSL Proxying，解密并检查所选应用和域名的 HTTPS 抓包流量，可使用主机名或通配符规则。

SSL Proxying 用于告诉 Proxyman 需要解密哪些应用和域名，从而让你以明文方式查看它们的 HTTPS 请求和响应。

对于 macOS 上的 HTTP/2 流量，还需在 Settings 中启用 **Use HTTP/2**。有关设置和协议检查，请参阅 [HTTP/2 指南](https://proxyman.com/docs/zh-cn/basic-features/http2)。检查 HTTPS 内容仍然需要证书信任和 SSL Proxying。

## 视频 {#video}

[Video: 使用 Proxyman 抓取 HTTP 和 HTTPS 流量](https://proxyman.com/videos/capture-http-https-traffic) (25 seconds)

## 1. SSL Proxying 列表 {#1-ssl-proxying-list}

SSL Proxying 列表是 Proxyman 需要解密其 SSL 连接的域名或应用的列表。通过它，你可以以明文方式检查 HTTPS 请求和响应。

### Include List 和 Exclude List {#include-list-and-exclude-list}

你可以为以下内容定义规则：

* **Include List**：拦截 Include List 中应用或域名的流量
* **Exclude List**：忽略 Exclude List 中应用或域名的所有流量

![Proxyman SSL Proxying 列表窗口，Include List 标签页中包含 jsonplaceholder.typicode.com、httpbin.proxyman.app 和 Safari](https://proxyman.com/docs/assets/proxyman-ssl-proxying-list.jpg)

_SSL Proxying Include List_

> **备注:** 按 ⌘⌥P 可快速打开 SSL Proxying 列表。

### 应用 / 域名 / 通配符 {#apps--domains--wildcards}

Proxyman 支持多种格式来定义规则：

* **按应用**：拦截该应用的所有流量
* **按域名**：拦截该域名的所有流量
* **通配符**：拦截与该通配符匹配的所有域名的流量

例如：

| 通配符                      | 说明                                                        |
| --------------------------- | ----------------------------------------------------------- |
| \*                          | 解密所有 HTTPS 流量                                         |
| \*.domain.com, \*.apple.com | 例如 v1.domain.com、data.domain.com、health.apple.com 等    |
| v?.domain.com               | 例如 v1.domain.com、v2.domain.com 等                        |

> **备注:** 在拦截任何 HTTPS 请求之前，你必须先设置 Proxyman 证书。请按照 [macOS 设置指南](https://proxyman.com/docs/zh-cn/debug-devices/macos) 安装并信任该证书。

### 如何为特定域名或应用启用 SSL Proxying {#how-to-enable-ssl-proxying-on-a-particular-domain-or-app}

* 在左侧面板中右键点击应用或域名 → **Enable SSL Proxying**。如果已启用，菜单会改为显示 **Disable SSL Proxying**。

![Proxyman 侧边栏中域名的右键菜单，SSL Proxying 开关位于 Open as New Tab 和 Open as Split View 下方](https://proxyman.com/docs/assets/proxyman-open-as-new-tab-menu.jpg)

_域名的侧边栏菜单_

* 在主表格中右键点击请求 → **Enable SSL Proxying**
* 选中该请求，然后在 Response 面板中启用 SSL Proxying。

![Proxyman Response 面板显示加密的 HTTPS 响应，带有 Enable only this domain 和 Enable all domains 按钮](https://proxyman.com/docs/assets/proxyman-enable-ssl-proxying-response-panel.jpg)

_启用整个应用或单个域名_

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

* [我们能否绕过 SSL Pinning？](https://proxyman.com/posts/2019-11-15-Can-we-bypass-ssl-pinning)
