-
Notifications
You must be signed in to change notification settings - Fork 681
Open
Description
很感谢作者大大的整理,
第三方 https://raw.fgit.cf/ 加速站失效了
可以通过下面的方式替换
GITHUB_PROXY = 'https://mirror.ghproxy.com/'; // 代理地址
async function fetchTVBox() {
const url = `${GITHUB_PROXY}https://github.com/2hacc/TVBox/raw/main/tvbox.json`;
const response = await fetch(url);
const data = await response.json();
const dataString = JSON.stringify(data);
const replacedDataString = dataString.replaceAll(
'https://raw.fgit.cf/2hacc/TVBox/main',
`${GITHUB_PROXY}https://github.com/2hacc/TVBox/raw/main`
);
const replacedData = JSON.parse(replacedDataString);
return new Response(JSON.stringify(replacedData), {
headers: { 'Content-Type': 'application/json' }
});
}希望未来能够尽可能以不信任第三方链接的形式发布,如提供使用github直链,或类似于Cloudfalre R2 CDN等
CSY2022, 45473219 and ByLiangCheng
Metadata
Metadata
Assignees
Labels
No labels