# 快速开始

5 分钟发出你的第一个代理请求。

## 1. 获取凭证

1. 登录 [控制台](https://dashboard.helodata.com)。
2. 进入 **住宅 → 子账号**，点击 **创建子账号**。
3. 复制子账号名（例如 `s1a2b3c4d5e`）和密码。

请求中实际使用的代理用户名遵循 [helodata 用户名语法](/helodata-zh/kuai-su-ru-men/username-format.md)。本指南示例使用的用户名为：

```
helo_s1a2b3c4d5e-type-res-region-us
```

请把示例中的 `s1a2b3c4d5e` 换成你自己的子账号名，把 `PASSWORD` 换成密码。

## 2. 发送请求

### curl

```bash
curl -x http://helo_s1a2b3c4d5e-type-res-region-us:PASSWORD@gate.helodata.io:7777 \
     https://ipv4.icanhazip.com
```

返回的 IP 应当**不是**你本机的 IP——它是一个美国住宅出口节点。

### Python (requests)

```python
import requests

USER = "helo_s1a2b3c4d5e-type-res-region-us"
PASS = "PASSWORD"
proxy = f"http://{USER}:{PASS}@gate.helodata.io:7777"

r = requests.get(
    "https://ipv4.icanhazip.com",
    proxies={"http": proxy, "https": proxy},
    timeout=30,
)
print(r.text.strip())
```

### Node.js (fetch + undici)

```js
import { fetch, ProxyAgent } from "undici";

const user = "helo_s1a2b3c4d5e-type-res-region-us";
const pass = "PASSWORD";
const agent = new ProxyAgent(`http://${user}:${pass}@gate.helodata.io:7777`);

const res = await fetch("https://ipv4.icanhazip.com", { dispatcher: agent });
console.log((await res.text()).trim());
```

### Go (net/http)

```go
package main

import (
    "fmt"
    "io"
    "net/http"
    "net/url"
    "time"
)

func main() {
    proxyURL, _ := url.Parse("http://helo_s1a2b3c4d5e-type-res-region-us:PASSWORD@gate.helodata.io:7777")
    client := &http.Client{
        Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)},
        Timeout:   30 * time.Second,
    }
    resp, err := client.Get("https://ipv4.icanhazip.com")
    if err != nil { panic(err) }
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
```

### PHP (cURL)

```php
<?php
$ch = curl_init('https://ipv4.icanhazip.com');
curl_setopt_array($ch, [
    CURLOPT_PROXY          => 'http://gate.helodata.io:7777',
    CURLOPT_PROXYUSERPWD   => 'helo_s1a2b3c4d5e-type-res-region-us:PASSWORD',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT        => 30,
]);
echo trim(curl_exec($ch));
curl_close($ch);
```

## 3. 切换国家

修改用户名中的 `region` 段为 ISO-3166 国家代码：

```bash
curl -x http://helo_s1a2b3c4d5e-type-res-region-de:PASSWORD@gate.helodata.io:7777 \
     https://ipv4.icanhazip.com
```

返回的 IP 现在会落在德国。完整地理参数列表见[国家与城市](/helodata-zh/chan-pin/overview/locations.md)。

## 4. 复用同一个 IP

追加 `-session-XXX-sesstime-N`，在 N 分钟内保持同一出口 IP：

```bash
curl -x http://helo_s1a2b3c4d5e-type-res-region-de-session-abc123-sesstime-30:PASSWORD@gate.helodata.io:7777 \
     https://ipv4.icanhazip.com
```

连续运行两次——两次返回的 IP 应当相同。

## 5. 切换产品

**移动代理**只需把 `type` 段换成 `mob`：

```bash
curl -x http://helo_s1a2b3c4d5e-type-mob-region-jp-asn-2516:PASSWORD@gate.helodata.io:7777 \
     https://ipv4.icanhazip.com
```

（上例通过 ASN 2516 绑定日本 KDDI。）

**ISP 代理**不使用网关、也不套用户名语法。下单后控制台会给你一份 `ip:port:user:pass` 形式的静态 IP 清单，每一行都是一个独立代理：

```bash
curl -x http://helo_s1a2b3c4d5e:PASSWORD@198.51.100.42:8000 \
     https://ipv4.icanhazip.com
```

完整流程见 [ISP 快速开始](/helodata-zh/chan-pin/overview-2/quick-start.md)。

## 下一步

* [用户名格式](/helodata-zh/kuai-su-ru-men/username-format.md) — 所有字段、所有可选项
* [身份认证](/helodata-zh/chan-pin/overview/authentication.md) — 从凭证切换为 IP 白名单
* [会话与轮换](/helodata-zh/chan-pin/overview/sessions-and-rotation.md) — 粘性与轮换策略
* [集成指南](/helodata-zh/ji-cheng-zhi-nan/integrations.md) — Selenium、Puppeteer、Scrapy 等
* [故障排查](/helodata-zh/gu-zhang-pai-cha/troubleshooting.md) — 首个请求未成功时查这里


---

# 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/kuai-su-ru-men/quick-start.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.
