# Chrome

Chrome 本身没有按标签页设置代理的 UI——默认跟随系统代理。按灵活度递增有三种方式：

1. **系统级代理**（最简单，影响所有应用）：见 [Windows](/helodata-zh/ji-cheng-zhi-nan/cao-zuo-xi-tong/windows.md)、[macOS](/helodata-zh/ji-cheng-zhi-nan/cao-zuo-xi-tong/macos.md)、[Linux](/helodata-zh/ji-cheng-zhi-nan/cao-zuo-xi-tong/linux.md)。
2. **按 Chrome 配置目录用命令行参数** — 不同的 user data dir 用不同代理。
3. **扩展**（如 SwitchyOmega）按标签/按域名规则切换。

## 方式 2 — `--proxy-server` 参数

用独立的 user data dir 启动 Chrome 并指定 `--proxy-server`，最适合采集集群与无头自动化。

```bash
# 住宅
google-chrome \
  --user-data-dir=/tmp/chrome-helo-res \
  --proxy-server="http://gate.helodata.io:7777"

# ISP
google-chrome \
  --user-data-dir=/tmp/chrome-helo-isp \
  --proxy-server="http://198.51.100.42:8000"
```

Chrome 的 `--proxy-server` 不接受内嵌凭证。Chrome 弹出代理登录框时填入：

* 用户名：完整代理用户名（如 `helo_s1a2b3c4d5e-type-res-region-us`）
* 密码：子账号密码

如要避免每次弹窗，请用可预填凭证的扩展，或改用系统级代理。

## 方式 3 — SwitchyOmega（最灵活）

1. 在 Chrome Web Store 安装 **SwitchyOmega**。
2. **新建情景 → Proxy profile**。
3. 填写：
   * 协议：`HTTP` 或 `SOCKS5`
   * 服务器：`gate.helodata.io`（或你的 ISP IP）
   * 端口：`7777`
   * 认证：点击小锁 → 用户名 + 密码
4. **应用选项**。
5. 点击 SwitchyOmega 图标按浏览场景切换情景。

\[screenshot: SwitchyOmega "新建情景" 填好住宅代理的截图]

## 验证连通

访问 `https://ipv4.icanhazip.com`，显示的 IP 应来自 helodata，而非你本机。

## 常见陷阱

* **每次重启都弹凭证框** — Chrome 不跨会话记代理凭证。用 SwitchyOmega 或系统级配置。
* **`net::ERR_TUNNEL_CONNECTION_FAILED`** — 代理 URL 语法错或凭证错，详见 [407 排错](/helodata-zh/gu-zhang-pai-cha/407.md)。
* **WebRTC IP 泄露** — 若需对 `getUserMedia` 隐藏本机 IP，安装 SwitchyOmega/WebRTC-Leak-Shield 扩展。

## DevTools Network 面板仍可用

helodata 是转发代理，DevTools 看到的请求与平时一致，请求头、状态码、时序都可正常检视。


---

# 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/liu-lan-qi/chrome.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.
