订阅链接配置
了解如何添加、更新和管理 AiBooster 订阅,以及配置文件结构详解。
订阅链接配置
订阅是获取和更新节点的最便捷方式。本文介绍如何管理订阅以及配置文件的详细结构。
什么是订阅?
订阅是一个 URL 链接,包含:
- 服务器节点信息
- 自动更新功能
- 流量使用统计
配置文件结构
AiBooster 使用 JSON 格式的配置文件。以下是完整的配置结构:
{
"log": {},
"dns": {},
"ntp": {},
"inbounds": [],
"outbounds": [],
"route": {},
"experimental": {}
}配置字段说明
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
log | 对象 | 否 | 日志配置,控制日志级别和输出 |
dns | 对象 | 否 | DNS 配置,用于域名解析 |
ntp | 对象 | 否 | NTP 配置,用于时间同步 |
inbounds | 数组 | 否 | 入站配置,定义本地监听 |
outbounds | 数组 | 是 | 出站配置,定义代理节点 |
route | 对象 | 否 | 路由配置,定义分流规则 |
experimental | 对象 | 否 | 实验性功能配置 |
日志配置 (log)
{
"log": {
"disabled": false,
"level": "info",
"output": "box.log",
"timestamp": true
}
}| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
disabled | 布尔 | false | 禁用日志输出 |
level | 字符串 | "info" | 日志级别:trace, debug, info, warn, error, fatal, panic |
output | 字符串 | - | 日志输出文件路径 |
timestamp | 布尔 | true | 是否添加时间戳 |
DNS 配置 (dns)
{
"dns": {
"servers": [
{
"tag": "google",
"address": "tls://8.8.8.8",
"detour": "proxy"
},
{
"tag": "local",
"address": "223.5.5.5",
"detour": "direct"
}
],
"rules": [
{
"domain_suffix": [".cn"],
"server": "local"
}
],
"final": "google"
}
}入站配置 (inbounds)
入站定义了 AiBooster 在本地监听的端口和协议:
{
"inbounds": [
{
"type": "mixed",
"tag": "mixed-in",
"listen": "127.0.0.1",
"listen_port": 7890
},
{
"type": "tun",
"tag": "tun-in",
"interface_name": "utun",
"inet4_address": "172.19.0.1/30",
"auto_route": true,
"strict_route": true
}
]
}支持的入站类型:
mixed- HTTP/SOCKS5 混合代理socks- SOCKS5 代理http- HTTP 代理tun- TUN 虚拟网卡(透明代理)redirect- 透明代理重定向tproxy- Linux 透明代理
出站配置 (outbounds)
出站定义了代理节点和直连规则:
{
"outbounds": [
{
"type": "selector",
"tag": "proxy",
"outbounds": ["auto", "hk-node", "us-node"],
"default": "auto"
},
{
"type": "urltest",
"tag": "auto",
"outbounds": ["hk-node", "us-node"],
"url": "https://www.gstatic.com/generate_204",
"interval": "3m"
},
{
"type": "shadowsocks",
"tag": "hk-node",
"server": "hk.example.com",
"server_port": 443,
"method": "aes-256-gcm",
"password": "your-password"
},
{
"type": "direct",
"tag": "direct"
},
{
"type": "block",
"tag": "block"
},
{
"type": "dns",
"tag": "dns-out"
}
]
}支持的出站类型:
direct- 直接连接block- 阻止连接dns- DNS 出站selector- 手动选择节点urltest- 自动测速选择shadowsocks- Shadowsocks 协议vmess- VMess 协议trojan- Trojan 协议hysteria- Hysteria 协议hysteria2- Hysteria2 协议vless- VLESS 协议wireguard- WireGuard 协议ssh- SSH 协议http- HTTP 代理socks- SOCKS5 代理
路由配置 (route)
路由定义了流量分流规则:
{
"route": {
"rules": [
{
"protocol": "dns",
"outbound": "dns-out"
},
{
"geoip": ["private"],
"outbound": "direct"
},
{
"geosite": ["cn"],
"outbound": "direct"
},
{
"geosite": ["geolocation-!cn"],
"outbound": "proxy"
}
],
"rule_set": [
{
"tag": "geoip-cn",
"type": "remote",
"format": "binary",
"url": "https://example.com/geoip-cn.srs"
}
],
"final": "proxy",
"auto_detect_interface": true
}
}路由匹配条件:
domain- 精确域名匹配domain_suffix- 域名后缀匹配domain_keyword- 域名关键词匹配domain_regex- 域名正则匹配geosite- GeoSite 规则集geoip- GeoIP 规则集ip_cidr- IP CIDR 匹配port- 端口匹配protocol- 协议匹配network- 网络类型(tcp/udp)
实验性功能 (experimental)
{
"experimental": {
"cache_file": {
"enabled": true,
"path": "cache.db"
},
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "ui",
"secret": ""
}
}
}添加订阅
步骤
- 获取订阅链接(从服务提供商处)
- 打开 AiBooster
- 点击 "+" 或 "添加配置"
- 选择 "订阅链接"
- 填写信息:
- 名称:自定义名称(如"工作订阅")
- URL:粘贴订阅链接
- 点击 "保存"
订阅链接格式
https://example.com/api/v1/client/subscribe?token=xxxxxx
订阅链接包含你的账户信息,请勿分享给他人。
更新订阅
手动更新
- 进入 配置文件 页面
- 找到目标订阅
- 点击 刷新 图标
- 等待更新完成
自动更新
- 进入 设置 → 订阅设置
- 开启 自动更新
- 设置更新间隔(推荐 24 小时)
| 更新间隔 | 适用场景 |
|---|---|
| 1 小时 | 节点频繁变化 |
| 6 小时 | 一般使用 |
| 24 小时 | 稳定服务商 |
| 手动 | 按需更新 |
管理多个订阅
AiBooster 支持添加多个订阅:
切换订阅
- 进入 配置文件 页面
- 点击要使用的订阅
- 自动切换到该订阅的节点列表
删除订阅
- 长按或右键点击订阅
- 选择 删除
- 确认删除
编辑订阅
- 点击订阅右侧的 编辑 图标
- 修改名称或 URL
- 保存更改
订阅转换
如果订阅格式不兼容,可以使用订阅转换:
在线转换
- 访问订阅转换服务
- 输入原始订阅链接
- 选择输出格式(AiBooster JSON)
- 复制转换后的链接
- 在 AiBooster 中添加
内置转换
AiBooster 内置订阅转换器:
- 添加订阅时选择 高级选项
- 选择 订阅类型:
- 自动检测
- AiBooster(JSON 格式)
- Clash
- V2ray
- Shadowsocks
查看订阅信息
点击订阅可查看:
- 节点数量:可用服务器数
- 已用流量:本周期已使用
- 剩余流量:本周期剩余
- 到期时间:订阅有效期
- 上次更新:最近更新时间
常见问题
更新失败
- 检查网络连接
- 确认订阅链接正确
- 尝试使用代理更新
- 联系服务提供商
节点列表为空
- 手动更新订阅
- 检查订阅是否过期
- 确认订阅格式兼容
流量信息不显示
部分订阅可能不提供流量统计,这是正常现象。
建议定期更新订阅以获取最新节点。