Skip to content

公共 API ​

无需登录即可访问的接口,主要供首页、节点列表、下载页、关于页使用。

API 列表 ​

序号接口路径功能
1节点探针/node获取节点详细信息(负载、连接数、流量)
2节点列表/nodes获取在线节点列表
3系统公告/notice获取系统公告
4服务统计/info获取全站统计信息
5下载列表/downlist获取客户端下载列表与下载源
6版本信息/version获取各组件版本号
7服务商列表/splist获取服务商列表

均为 GET(无鉴权),不需要 csrf,但仍建议带 waf: off。

1. 节点探针 /node ​

json
{
  "status": 200,
  "number": 10,
  "servers": [
    {
      "id": "1",
      "name": "香港节点",
      "version": "0.59.0",
      "bind_port": "7000",
      "vhost_http_port": "80",
      "vhost_https_port": "443",
      "total_traffic_in": "1024000",
      "total_traffic_out": "512000",
      "cur_conns": "150",
      "client_counts": "45",
      "cpu_usage": "25.5%",
      "ram_usage": "60.2%",
      "disk_usage": "45.8%",
      "status": "正常"
    }
  ]
}
字段说明
status节点负载状态:正常 / 中负荷 / 高负荷
bind_portfrps 连接端口
vhost_http_port / vhost_https_port域名接入端口
cur_conns当前连接数
client_counts在线客户端数
cpu_usage / ram_usage / disk_usage负载百分比

前端节点详情弹窗还会展示实时上传 / 下载速度与今日入网 / 出网(若后端返回对应字段)。

2. 节点列表 /nodes ​

json
{
  "status": 200,
  "number": 10,
  "servers": [
    { "id": "1", "name": "香港节点", "description": "[|1000Mbps | 国内穿透推荐]" }
  ]
}

description 为节点的宣传 / 说明标签,前端在节点列表与创建隧道时展示。

3. 系统公告 /notice ​

返回全站公告,前端由 AnnouncementModal.vue 在登录后展示(渲染前经 DOMPurify 清洗),同一公告 24 小时内不重复弹出。

4. 服务统计 /info ​

json
{
  "status": 200,
  "aflow": "1024000",
  "aflowin": "512000",
  "aflowout": "512000",
  "eflow": "10240",
  "eflowin": "5120",
  "eflowout": "5120",
  "oclient": 107,
  "totalrun": "50000",
  "todayrun": "150"
}
字段说明
aflow / aflowin / aflowout累计总流量 / 入站 / 出站(MB)
eflow / eflowin / eflowout今日流量 / 入站 / 出站(MB)
oclient在线客户端数
totalrun / todayrun累计 / 今日启动次数

首页与控制台都使用该接口。

5. 下载列表 /downlist ​

json
{
  "status": 200,
  "source": [
    { "name": "官方下载", "url": "https://down.hxit.top/HayFrp/Releases/" }
  ],
  "lists": [
    {
      "name": "HayFrp-Android-arm64.apk",
      "url": "https://down.hxit.top/HayFrp/Releases/HayFrp-Android-arm64.apk",
      "arch": "android_arm64",
      "version": "0.56.0"
    }
  ]
}
  • source:下载源列表(前端展示多个下载源)
  • lists:具体文件,arch 用于按平台归类(如 windows_amd64、linux_arm64、darwin_arm64、android_arm64)

6. 版本信息 /version ​

json
{
  "ver_hayfrps": "0.59.0",
  "ver_frpc": "0.59.0",
  "ver_launcher": "3.0",
  "ver_console": "3.0",
  "ver_dashboard": "1.0",
  "url_launcher": "http://114514.cn"
}
字段说明
ver_hayfrpsfrps 服务端版本
ver_frpcfrpc 客户端版本
ver_launcher桌面启动器版本
ver_console控制台版本
ver_dashboard服务商面板版本
url_launcher启动器下载地址

7. 服务商列表 /splist ​

返回服务商及其服务器概况(username、description、qid、scount 服务器数、oscount 在线数、servers 列表),用于「关于」页展示。前端做分页与空态处理。

前端封装 ​

typescript
const nodeInfo = await api.getNodeInfo()
const nodeList = await api.getNodeList()
const notice = await api.getNotice()
const info = await api.getInfo()
const downloads = await api.getDownloadList()
const version = await api.getVersion()
const spList = await api.getSpList()

相关页面 ​

基于 MIT 许可证发布