> For the complete documentation index, see [llms.txt](https://docs.ipdunar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipdunar.com/zh/chan-pin/overview-2/quick-start.md).

# 快速开始

## 1. 下单 ISP IP

> 开始无需 KYC。若账户触发风险复核，我们可能在后续要求验证——见 [身份验证 (KYC)](https://docs.ipdunar.com/zh/zhang-hu-yu-ji-fei/kyc.md)。

1. 进入 **控制台 → ISP → 下单**。
2. 选择**国家**（如该国支持则可选**城市**）。
3. 选择**数量**——单笔最少 1 个、最多 5,000 个。
4. 选择**计费周期**——按月或按年。
5. 点击 **下单**。T1 国家通常 1–5 分钟内交付，长尾国家最长 24 小时。

批次就绪后会发邮件通知。

## 2. 下载清单

1. 打开 **控制台 → ISP → 我的 IP → {批次}**。
2. 点击 **下载**，选择格式：
   * **`ip:port:user:pass`**（默认）— 每行一个 IP
   * **CSV** — 列 `ip,port,user,pass,country,city,asn`
   * **JSON** — 完整元数据，含 ASN 与城市
   * **Proxifier / FoxyProxy / SwitchyOmega** — 可直接导入的文件

或通过 API：

```bash
curl -H "Authorization: Bearer API_KEY" \
     "https://api.ipdunar.com/v1/isp/batches/{batch_id}/ips?format=plain"
```

完整说明见 [代理清单格式](https://docs.ipdunar.com/zh/chan-pin/overview-2/proxy-list-format.md)。

## 3. 发送请求

任取清单中一个 IP：

### curl

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

返回应严格是 `198.51.100.42`——这是静态 IP。

### Python (requests)

```python
import requests

PROXY = "http://ipdunar_s1a2b3c4d5e:PASSWORD@198.51.100.42:8000"

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

### Node.js (undici)

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

const agent = new ProxyAgent(
  "http://ipdunar_s1a2b3c4d5e:PASSWORD@198.51.100.42:8000"
);
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"
)

func main() {
    proxyURL, _ := url.Parse("http://ipdunar_s1a2b3c4d5e:PASSWORD@198.51.100.42:8000")
    client := &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)}}
    resp, _ := client.Get("https://ipv4.icanhazip.com")
    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://198.51.100.42:8000',
    CURLOPT_PROXYUSERPWD   => 'ipdunar_s1a2b3c4d5e:PASSWORD',
    CURLOPT_RETURNTRANSFER => true,
]);
echo trim(curl_exec($ch));
curl_close($ch);
```

## 4. 使用整批清单（轮换）

加载清单，按请求挑下一个 IP。简单轮询：

```python
import itertools, requests

with open("isp.txt") as f:
    proxies = [line.strip() for line in f if line.strip()]

pool = itertools.cycle(proxies)                                  # 每行 ip:port:user:pass

def get(url):
    line = next(pool)
    ip, port, user, password = line.split(":", 3)
    p = f"http://{user}:{password}@{ip}:{port}"
    return requests.get(url, proxies={"http": p, "https": p}, timeout=30)
```

更健壮的模式见 [客户端轮换](https://docs.ipdunar.com/zh/chan-pin/overview-2/rotation.md)。

## 下一步

* [代理清单格式](https://docs.ipdunar.com/zh/chan-pin/overview-2/proxy-list-format.md) — 所有格式变体
* [身份认证](https://docs.ipdunar.com/zh/chan-pin/overview-2/authentication.md) — 切换到 IP 白名单
* [IP 管理](https://docs.ipdunar.com/zh/chan-pin/overview-2/ip-management.md) — 替换失效 IP、刷新批次


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ipdunar.com/zh/chan-pin/overview-2/quick-start.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
