export default async function handler(req) { const target = "http://120.76.248.139/udp/txiptv_chlist_zdy.php?deviceId=5b59b24e74886da42d969c7c6e09729b&ip=39.164.164.132:9901"; // 允许所有网页跨域调用 const headers = { "Access-Control-Allow-Origin": "*", "Content-Type": "text/plain; charset=utf-8" }; try { const res = await fetch(target, { headers: { "User-Agent": "Mozilla/5.0" } }); const text = await res.text(); return new Response(text, { headers }); } catch (e) { return new Response("抓取失败:" + e.message, { headers }); } }