🔄 MacCMS API 中转与订阅转换

支持通用 API 代理,以及按参数组合输出不同源格式、编码格式与代理模式。

1. 通用代理

在 URL 后添加 ?url=目标地址 即可中转任意 HTTP API:

https://luna-api.341358.xyz/?url=<目标 API 地址>

2. 推荐订阅参数

参数 说明
source full = 完整版(默认)
jingjian = 精简版+成人
jin18 = 精简版
schema lunatv = LunaTV 原始结构(默认)
ouonnkitv = OuonNkiTV 地址列表结构
donggua = DongguaTV 源结构
encoding raw = 不编码,直接输出 JSON 字段(默认)
base58 = Base58 编码
base64 = Base64 编码
proxy true / 1 = 对输出中的 API 地址加代理前缀
false / 0 = 保持原始地址(默认)
prefix 自定义代理前缀;未传时默认使用 https://luna-api.341358.xyz/?url=

3. 参数处理顺序

处理管线:读取配置源 → 转为目标 schema → 按需替换代理前缀 → 按 encoding 输出

后续新增其他格式时,只需要补充新的 schema builder 即可,无需再扩充编号。

4. 输出结构示例

LunaTV(schema=lunatv)

直接输出 LunaTV 原始 JSON 结构;当 proxy=true 时递归替换其中的 api 字段。

OuonNkiTV(schema=ouonnkitv)

[
  {
    "id": "source1",
    "name": "示例视频源",
    "url": "https://api.example.com/search",
    "detailUrl": "https://api.example.com/detail",
    "isEnabled": true
  }
]

proxy=true 时替换 url / detailUrl

DongguaTV(schema=donggua)

{
  "sites": [
    {
      "key": "unique_key1",
      "name": "站点名称1",
      "api": "https://api.example.com",
      "active": true
    }
  ]
}

proxy=true 时替换 api

5. 常用示例

默认参数(等价于 full + lunatv + raw + false):
https://luna-api.341358.xyz?source=full&schema=lunatv&encoding=raw&proxy=false

LunaTV 代理 Base58:
https://luna-api.341358.xyz?source=full&schema=lunatv&encoding=base58&proxy=true

OuonNkiTV 原始 JSON:
https://luna-api.341358.xyz?source=jin18&schema=ouonnkitv&encoding=raw&proxy=false

DongguaTV 代理 JSON:
https://luna-api.341358.xyz?source=jingjian&schema=donggua&encoding=raw&proxy=true

DongguaTV 原始 Base64:
https://luna-api.341358.xyz?source=jin18&schema=donggua&encoding=base64&proxy=false

6. 按配置源快速复制

📦 精简版(jin18)

LunaTV 原始 JSON:
https://luna-api.341358.xyz?source=jin18&schema=lunatv&encoding=raw&proxy=false

LunaTV 代理 Base58:
https://luna-api.341358.xyz?source=jin18&schema=lunatv&encoding=base58&proxy=true

OuonNkiTV 原始 JSON:
https://luna-api.341358.xyz?source=jin18&schema=ouonnkitv&encoding=raw&proxy=false

DongguaTV 代理 Base64:
https://luna-api.341358.xyz?source=jin18&schema=donggua&encoding=base64&proxy=true

📦 精简版+成人(jingjian)

LunaTV 原始 JSON:
https://luna-api.341358.xyz?source=jingjian&schema=lunatv&encoding=raw&proxy=false

LunaTV 代理 Base58:
https://luna-api.341358.xyz?source=jingjian&schema=lunatv&encoding=base58&proxy=true

OuonNkiTV 原始 JSON:
https://luna-api.341358.xyz?source=jingjian&schema=ouonnkitv&encoding=raw&proxy=false

DongguaTV 代理 Base64:
https://luna-api.341358.xyz?source=jingjian&schema=donggua&encoding=base64&proxy=true

📦 完整版(full)

LunaTV 原始 JSON:
https://luna-api.341358.xyz?source=full&schema=lunatv&encoding=raw&proxy=false

LunaTV 代理 Base58:
https://luna-api.341358.xyz?source=full&schema=lunatv&encoding=base58&proxy=true

OuonNkiTV 原始 JSON:
https://luna-api.341358.xyz?source=full&schema=ouonnkitv&encoding=raw&proxy=false

DongguaTV 代理 Base64:
https://luna-api.341358.xyz?source=full&schema=donggua&encoding=base64&proxy=true

7. 支持能力