huya流代理

This commit is contained in:
mtvpls
2026-01-20 13:31:52 +08:00
parent 16e56dbb33
commit e2a94fee2d
3 changed files with 40 additions and 2 deletions
+3 -2
View File
@@ -56,9 +56,10 @@ export async function GET(request: NextRequest) {
const { sFlvUrl, sStreamName, sFlvUrlSuffix, sFlvAntiCode } = streamInfo;
const newAntiCode = getAntiCode(sFlvAntiCode, sStreamName);
const url = `${sFlvUrl}/${sStreamName}.${sFlvUrlSuffix}?${newAntiCode}`;
const streamUrl = `${sFlvUrl}/${sStreamName}.${sFlvUrlSuffix}?${newAntiCode}`;
const proxyUrl = `/api/web-live/proxy/proxy.flv?url=${encodeURIComponent(streamUrl)}`;
return NextResponse.json({ url });
return NextResponse.json({ url: proxyUrl });
}
return NextResponse.json({ error: '不支持的平台' }, { status: 400 });