探针宿主机炸了
等恢复又得重新配置X﹏X
=====================
用了CloudFlare Worker搓了个随机图片api (如果点进去一样就清理浏览器缓存 = =)
// 内置的图片URL列表
const imageUrls = [
'<https://r2.example.com/Wallpaper/EF-aroundtheglobeportugal.jpg>',
'<https://r2.example.com/Wallpaper/EF-birds.jpg>',
'<https://r2.example.com/Wallpaper/EF-burgers.jpg>',
'<https://r2.example.com/Wallpaper/EF-cannon.jpg>',
'<https://r2.example.com/Wallpaper/EF-cats.jpg>',
'<https://r2.example.com/Wallpaper/EF-chest.jpg>',
'<https://r2.example.com/Wallpaper/EF-dance.jpg>',
'<https://r2.example.com/Wallpaper/EF-ddragon-atack.jpg>',
'<https://r2.example.com/Wallpaper/EF-farmer.jpg>',
'<https://r2.example.com/Wallpaper/EF-fastfood.jpg>',
'<https://r2.example.com/Wallpaper/EF-fire.jpg>',
'<https://r2.example.com/Wallpaper/EF-frienddead.jpg>',
'<https://r2.example.com/Wallpaper/EF-frienddead1.jpg>',
'<https://r2.example.com/Wallpaper/EF-havefun.jpg>',
'<https://r2.example.com/Wallpaper/EF-minecart.jpg>',
'<https://r2.example.com/Wallpaper/EF-nether.jpg>',
'<https://r2.example.com/Wallpaper/EF-onice.jpg>',
'<https://r2.example.com/Wallpaper/EF-pirate2.jpg>',
'<https://r2.example.com/Wallpaper/EF-ravine.jpg>',
'<https://r2.example.com/Wallpaper/EF-riding-dragon.jpg>',
'<https://r2.example.com/Wallpaper/EF-riding.jpg>',
'<https://r2.example.com/Wallpaper/EF-riding1.jpg>',
'<https://r2.example.com/Wallpaper/EF-selfie2.jpg>',
'<https://r2.example.com/Wallpaper/EF-skydiving.jpg>',
'<https://r2.example.com/Wallpaper/EF-spectator.jpg>',
'<https://r2.example.com/Wallpaper/EF-swords.jpg>',
'<https://r2.example.com/Wallpaper/EF-templefriends.jpg>',
'<https://r2.example.com/Wallpaper/EF-tunel.jpg>',
'<https://r2.example.com/Wallpaper/EF-zombie.jpg>',
'<https://r2.example.com/Wallpaper/模板_79牌_午睡_h1080_w1920.jpg>',
'<https://r2.example.com/Wallpaper/模板_小白_泪如雨下_创成式填充_Full.png>',
'<https://r2.example.com/Wallpaper/模板_盐牌_双人自拍_创成式填充.jpg>',
'<https://r2.example.com/Wallpaper/模板_盐牌_自拍_创成式填充_Full.png>',
];
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request));
});
async function handleRequest(request) {
const url = new URL(request.url);
if (url.pathname === '/api') {
try {
// 随机选择图片URL
const randomIndex = Math.floor(Math.random() * imageUrls.length);
const targetUrl = imageUrls[randomIndex];
// 请求图片数据
const imageResponse = await fetch(targetUrl);
// 创建新的响应对象并添加CORS头
return new Response(imageResponse.body, {
status: imageResponse.status,
headers: {
'Content-Type': imageResponse.headers.get('Content-Type'),
'Cache-Control': 'public, max-age=3600',
'Access-Control-Allow-Origin': '*',
// 可选:添加CDN缓存头
'CDN-Cache-Control': 'public, max-age=86400'
}
});
} catch (error) {
// 错误处理
return new Response('Image fetch failed', {
status: 502,
headers: { 'Content-Type': 'text/plain' }
});
}
}
return new Response('Not Found', {
status: 404,
headers: { 'Content-Type': 'text/plain' }
});
}
存储也是用CloudFlare R2存储 除了域名其他完全白嫖= =
等之后再添加其他壁纸了(挖坑) 此API也应用到了MCSM面板了
=======================
好像novaskin的双人壁纸并不是特别多,那我抽个时间全塞进去qwq
再去看看三人壁纸,想把『处刑未来』(就是那个满身绿绿的家伙,Executed_Future)也加入进去
但是他还是只有名字与外观的状态,没有人设和性格,相当于 「虚构的」
好像也不是很多(
=======================