# iOS

iOS 支持按 Wi-Fi 配置 HTTP 代理，且 UI 内建认证字段——比 Android 顺手。

## 按 Wi-Fi 配代理

1. **设置 → Wi-Fi → {你的网络 → ⓘ}**。
2. 下拉到 **HTTP 代理 → 配置代理 → 手动**。
3. 填写：
   * 服务器：`gate.helodata.io`（或 ISP IP）
   * 端口：`7777`
   * **鉴定**：打开
   * 用户名：完整代理用户名
   * 密码：子账号密码
4. **存储**。

\[screenshot: iOS HTTP 代理表单]

此设置影响该 Wi-Fi 下的所有应用——Safari、邮件、App Store、任何用系统 HTTP 栈的 App。

## 不行的场景

* **蜂窝数据** — 系统没有蜂窝代理字段。用 Wi-Fi 或 [Shadowrocket](/helodata-zh/ji-cheng-zhi-nan/yi-dong-duan/shadowrocket.md)。
* **自带网络栈的应用** — 部分游戏、银行 App。用 Shadowrocket 强制 OS 层路由。
* **SOCKS5** — iOS 原生 UI 不支持 SOCKS，用 Shadowrocket。

## 自动 / PAC 配置

在「配置代理」选 **自动** 并填 PAC URL——便于多目标切换而不必每次重输凭证：

```javascript
function FindProxyForURL(url, host) {
  if (host === "example.com")
    return "PROXY gate.helodata.io:7777";
  return "DIRECT";
}
```

把 PAC 文件托管在任意 HTTPS URL，iOS 指向它即可。

## 验证

在 Safari 访问 `https://ipv4.icanhazip.com`，应显示 helodata 的 IP，而非家庭网络出口。

## 常见陷阱

* **按网络配置** — 切到其他 Wi-Fi 需另配。
* **强制门户** — iOS 不论代理与否都展示门户页，登录后流量才走代理。门户页打不开时短暂关代理。
* **App pin 证书** — 自己 pin TLS 证书的 App 不接受任何代理拦截。helodata 是转发不拦截，所以一般无影响——但同时跑 MITM 调试代理会破坏 pin。


---

# 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/yi-dong-duan/ios.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.
