迁移文档并更新引用链接

This commit is contained in:
2025-12-15 13:20:41 +08:00
parent d62367f37e
commit fd2afe5e01
34 changed files with 231 additions and 317 deletions

View File

@@ -0,0 +1,67 @@
# 提取代理接口文档
## 请求方式
`GET https://lanhuip.com/api/extract`
## 请求参数
| 参数名 | 类型 | 必填 | 描述 |
|--------|----------|------|----------------------------------------------------------------------------------------------------------------------------|
| i | number | 是 | 用于提取的套餐 ID |
| t | number | 是 | 认证类型1 - 白名单2 - 密码 |
| a | string | 否 | 归属地省份。默认全局随机 |
| b | string | 否 | 归属地城市。默认全局随机 |
| s | string | 否 | 归属地运营商。默认全局随机 |
| d | string | 否 | 是否去重1 - 是0 - 否。默认为是 |
| rt | string | 否 | 返回类型1 - TXT2 - JSON。默认 TXT |
| rs | number[] | 否 | 返回时要使用的分隔符,值为该字符的 ascii 编码,可以有多个字符,多个字符用半角逗号连接。默认为 13,10即回车 + 换行(\r\n |
| rb | number[] | 否 | 返回时要使用的换行符,值为该字符的 ascii 编码,可以有多个字符,多个字符用半角逗号连接。默认为 124即垂直线 \| |
| n | number | 否 | 提取数量。默认为 1 |
## 响应参数
如果请求参数中返回类型为 TXT则响应为纯文本格式内容为提取的代理列表每个代理信息占一行。
如果请求参数中返回类型为 JSON则响应为 JSON 格式,内容为提取的代理列表,每个代理信息为一个对象,包含以下字段:
| 参数名 | 类型 | 描述 |
|----------|--------|--------------------------------------------- |
| host | string | 代理服务器地址 |
| port | number | 代理服务器端口 |
| username | string | 代理服务器用户名(仅在认证类型为密码时返回) |
| password | string | 代理服务器密码(仅在认证类型为密码时返回) |
## 示例
### 请求示例
```http
GET https://lanhuip.com/api/extract?i=1&t=2&a=广东省&b=广州市&s=移动&d=1&rt=2&n=3
```
### 响应示例
```json
[
{
"host": "fwd1.lanhuip.com",
"port": 20000,
"username": "user1",
"password": "pass1"
},
{
"host": "fwd1.lanhuip.com",
"port": 20001,
"username": "user2",
"password": "pass2"
},
{
"host": "fwd1.lanhuip.com",
"port": 20002,
"username": "user3",
"password": "pass3"
}
]
```

View File

@@ -18,7 +18,7 @@ import {toast} from 'sonner'
import {merge} from '@/lib/utils'
import {Combobox} from '@/components/ui/combobox'
import cities from './_assets/cities.json'
import ExtractDocs from '@/docs/extract.mdx'
import ExtractDocs from './extract.mdx'
import Link from 'next/link'
import {useProfileStore} from '@/components/stores/profile'

View File

@@ -174,7 +174,7 @@ function BalanceOrLogin(props: {
mode: Number(props.mode),
live: Number(props.live),
daily_limit: props.dailyLimit,
expire: Number(props.expire),
expire_at: Number(props.expire),
quota: props.quota,
},
}}/>

View File

@@ -166,7 +166,7 @@ function BalanceOrLogin(props: {
mode: Number(props.mode),
live: Number(props.live),
quota: props.quota,
expire: Number(props.expire),
expire_at: Number(props.expire),
daily_limit: props.dailyLimit,
},
}}/>