Proxies
代理相关的 API
获取所有代理
GET
/proxies
获取 Clash 中所有的代理
{
"proxies": {
"DIRECT": {
"type": "Direct"
},
"GLOBAL": {
"all": [
"Proxy",
"auto",
"🇭🇰"
],
"now": "Proxy",
"type": "Selector"
},
"Proxy": {
"all": [
"auto",
"🇭🇰"
],
"now": "auto",
"type": "Selector"
},
"REJECT": {
"type": "Reject"
},
"auto": {
"now": "🇭🇰",
"type": "URLTest"
},
"🇭🇰": {
"type": "Shadowsocks"
}
}
}
获取单个代理信息
GET
/proxies/:name
获取 Clash 中单个代理的信息
Path Parameters
Name
Type
Description
name
string
代理名 (大小写敏感)
{
"all": [
"auto",
"🇭🇰"
],
"now": "auto",
"type": "Selector"
}
获取单个代理的延迟
GET
/proxies/:name/delay
获取 Clash 中单个代理的延迟
Path Parameters
Name
Type
Description
name
string
代理名 (大小写敏感)
Query Parameters
Name
Type
Description
timeout
number
超时时间 (ms)
url
string
测试代理的目标网址
{
"delay": 200
}
切换 Selector 中选中的代理
PUT
/proxies/:name
当前接口只支持切换 Selector 中的代理
Path Parameters
Name
Type
Description
name
string
代理名称 (大小写敏感)
Request Body
Name
Type
Description
name
string
要切换的代理名字
Last updated