filter_func
Filter network traffic from Charles Proxy captures using host, method, or content criteria to isolate specific requests for debugging and monitoring.
Instructions
Filter traffic from a fixed capture window or the latest saved history package.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| capture_seconds | Yes | 录制持续时长,单位为秒。绝对不是 Unix 时间戳(如 1700000000)也不是毫秒时间戳(如 1700000000000)。0 表示读取最新历史流量包。 | |
| host_contains | No | 按 host 子串过滤(包含匹配)。例如:api.example.com | |
| http_method | No | HTTP 方法过滤。仅允许标准 HTTP 方法。必须是方法名,不是正则表达式,不是路径。 | |
| keyword_regex | No | 用于搜索请求/响应内容的 Python 正则表达式。建议使用短表达式,避免灾难性回溯。 | |
| keep_request | No | ||
| keep_response | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |