# Windows

系统级 HTTP/HTTPS 代理——所有遵循 Windows 代理设置的应用（Edge、默认 Chrome、.NET 应用、多数 CLI 工具）都会走 helodata。

## 设置 UI（Windows 10/11）

1. **设置 → 网络和 Internet → 代理 → 手动代理设置**。
2. 打开 **使用代理服务器**。
3. 地址：`gate.helodata.io`（或 ISP IP），端口：`7777`。
4. **保存**。
5. 下一个出站请求时会弹凭证框：
   * 用户名：完整代理用户名（如 `helo_s1a2b3c4d5e-type-res-region-us`）
   * 密码：子账号密码

设置 UI **不持久保存代理凭证**——按应用各存各的。无人值守场景请用 PowerShell 或 `netsh`。

\[screenshot: Windows 11 代理设置面板]

## PowerShell（程序化）

```powershell
$proxy = "http://gate.helodata.io:7777"
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' `
                 -Name ProxyServer -Value $proxy
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' `
                 -Name ProxyEnable -Value 1
```

取消：

```powershell
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' `
                 -Name ProxyEnable -Value 0
```

## CLI 工具

Windows 上 curl 读 `HTTP_PROXY` / `HTTPS_PROXY`：

```cmd
set HTTP_PROXY=http://helo_s1a2b3c4d5e-type-res-region-us:PASSWORD@gate.helodata.io:7777
set HTTPS_PROXY=%HTTP_PROXY%
curl https://ipv4.icanhazip.com
```

要持久化在 **系统属性 → 环境变量** 中设置。

## WinHTTP（Windows 服务、.NET）

Windows 服务与 .NET HttpClient（走 WinHTTP，而非用户代理）需配置系统级代理：

```cmd
netsh winhttp set proxy "gate.helodata.io:7777"
netsh winhttp show proxy
```

撤销：

```cmd
netsh winhttp reset proxy
```

WinHTTP 不允许把凭证嵌入代理 URL——调用方需通过 `IWebProxy.Credentials` 自行提供。

## 验证

```cmd
curl https://ipv4.icanhazip.com
```

或在 Edge 中打开该 URL。

## 常见陷阱

* **两套代理系统**（用户应用 WinINet vs 服务 WinHTTP）——可能需都配。
* **VPN 客户端** 常以更高优先级注入代理 hook，请断开 VPN 测试。
* **`.local` 与企业后缀**自动绕过——挺有用，但留意 bypass 清单别误把目标排掉。


---

# 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/cao-zuo-xi-tong/windows.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.
