电视直播代理控制权从客户端改为服务端

This commit is contained in:
mtvpls
2026-03-16 15:47:12 +08:00
parent 3bec268481
commit fe210c26cb
5 changed files with 86 additions and 42 deletions
+9
View File
@@ -153,6 +153,15 @@ export async function POST(request: NextRequest) {
config.LiveConfig = sortedLiveConfig;
break;
case 'toggle_proxy_mode':
// 切换代理模式
const toggleSource = config.LiveConfig.find((l) => l.key === key);
if (!toggleSource) {
return NextResponse.json({ error: '直播源不存在' }, { status: 404 });
}
toggleSource.proxyMode = !toggleSource.proxyMode;
break;
default:
return NextResponse.json({ error: '未知操作' }, { status: 400 });
}