# Postman

Postman 支持按集合 / 按请求配置代理，覆盖网关产品和 ISP，推荐用它快速试验用户名变体。

## 全局代理

1. **Settings → Proxy → Use custom proxy configuration**。
2. Server：`gate.helodata.io`，Port：`7777`（或 ISP IP）。
3. **Proxy Auth → on**，填用户名 + 密码。
4. 右上角操作区打开 **Proxy** 开关。

\[screenshot: Postman 代理设置标签]

影响该工作区中所有请求。

## 按环境

新建环境 `helo-us`、`helo-de` 等，各存代理用户名变体：

| 变量           | 值                                     |
| ------------ | ------------------------------------- |
| `proxy_user` | `helo_s1a2b3c4d5e-type-res-region-us` |
| `proxy_pass` | 子账号密码                                 |

**Settings → Proxy** 中引用 `{{proxy_user}}`、`{{proxy_pass}}`，切换环境即切换 geo。

## 预请求脚本（动态会话）

每个请求生成新的会话 ID：

```js
const sid = Math.random().toString(36).slice(2, 10);
pm.environment.set("proxy_user",
  `helo_s1a2b3c4d5e-type-res-region-us-session-${sid}-sesstime-10`
);
```

## 官方 Postman 集合

helodata 提供官方集合，包含：

* 全部 REST API 端点（子账号、订单、流量、白名单等）
* 每个产品类型一个示例请求，用户名结构正确

导入 URL：

```
https://api.helodata.com/v1/postman/collection.json
```

详见 [Postman 集合](/helodata-zh/api-can-kao/postman.md)。

## 验证

添加一个对 `https://ipv4.icanhazip.com` 的请求，发送——响应体应为 helodata 出口 IP。

## 常见陷阱

* **Postman 桌面版 vs Web 版** — 仅桌面版遵循代理设置；Web 客户端走 Postman 自己的服务器。
* **Newman（CLI 运行器）** 用同一份配置。CI 场景请传 `--global-proxy` 或先 `HTTPS_PROXY=…` 再 `newman run`。
* **目标自签证书** — Postman 会校验上游证书；helodata 不重签，目标自签证书仍会失败。需要时关闭 **SSL certificate verification**。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.helodata.com/helodata-zh/ji-cheng-zhi-nan/ai-yu-gong-zuo-liu/postman.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
