# 内容过滤器（Content Filter）

> 使用 Proxyman 内容过滤器，按类型、状态码、URL、Header、正文等快速查找请求，支持包含、通配符和正则匹配。

Proxyman 提供主过滤器（Primary Filter）和次过滤器（Secondary Filter），帮你快速找到想要的请求或响应。

> **备注:** **⌘F**：打开过滤栏
>
> **ESC**：关闭过滤栏

![Proxyman 过滤栏，已选中 HTTPS、JSON、Form、2xx 和 4xx，列表中只显示匹配的请求](https://proxyman.com/docs/assets/proxyman-content-filter-bar.jpg)

_一次选择多个过滤器_

![Proxyman 次过滤器的字段菜单，包含 URL、Host、Query String、Header、Body、Method、Status Code、Comment 和 Color](https://proxyman.com/docs/assets/proxyman-filter-key-menu.jpg)

_选择要过滤的内容_

![Proxyman 过滤匹配方式菜单，包含 Contains、Start With、Equal、数值比较、Match Wildcard 和 Match Regex](https://proxyman.com/docs/assets/proxyman-filter-matching-menu.jpg)

_选择匹配方式_

## 主过滤器 {#primary-filter}

| 过滤器    | 说明                                                    |
| --------- | ------------------------------------------------------- |
| All       | 所有请求和响应                                          |
| HTTP      | 仅 HTTP                                                 |
| HTTPS     | 仅 HTTPS                                                |
| WebSocket | 仅 WebSocket 和 Secure WebSocket                        |
| JSON      | Content-Type 为 application/json 或 JSON 内容           |
| Form      | 仅请求或响应中的 Form 正文                              |
| XML       | 仅 XML                                                  |
| JS        | 仅 JavaScript 内容                                      |
| CSS       | 仅 CSS 内容                                             |
| GraphQL   | GraphQL 请求（URL 包含 `/graphql`）                     |
| Document  | 文档内容：HTML 等                                       |
| Media     | 图片、音频和视频内容：PNG、JPG、GIF 等                  |
| Other     | 不属于以上任何类别的其他内容                            |
| h1        | 仅 HTTP/1.x 请求                                        |
| h2        | 仅 [HTTP/2](https://proxyman.com/docs/zh-cn/basic-features/http2) 请求                              |

## 状态过滤器 {#status-filters}

| 过滤器 | 说明                 |
| ------ | -------------------- |
| 1xx    | 状态码 100 至 199    |
| 2xx    | 状态码 200 至 299    |
| 3xx    | 状态码 300 至 399    |
| 4xx    | 状态码 400 至 499    |
| 5xx    | 状态码 500 及以上    |

> **备注:** 按住 ⌘ 键并点击，可以选择多个类型。

## 次过滤器 {#secondary-filter}

### 内容 {#content}

* URL
* Host
* Query String
* Request Header
* Response Header
* Request Body
* Response Body
* Method
* Status Code
* Duration (ms)
* Request Body Size (KB)
* Response Body Size (KB)
* GraphQL
* Client
* IP Address
* Comment
* Color

### 匹配方式 {#matching}

* Contains
* Not Contains
* Start With
* End With
* Equal
* Not Equal
* `<`（小于，用于数字）
* `>=`（大于或等于，用于数字）
* Match Wildcard
* Not Match Wildcard
* Match Regex
* Not Match Regex

## Header、Query、Auth、Form 过滤 {#header-query-auth-form-filter}

从 Proxyman 2.34.0 版本开始，你可以快速过滤所选请求和响应中的 Header、Query、Auth 和 Form 内容。

1. 点击对应的视图（例如请求的 Header 标签页）
2. 按 ⌘F，或右键点击 → **Show Filter**，打开过滤器

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

* [用 Multiple Filters 更快找到 HTTP 请求](https://proxyman.com/posts/2021-04-08-Use_Multiple_Filters)
