This commit is contained in:
BlueSkyXN 2024-10-14 15:02:52 +08:00
parent 9e51aaad0e
commit 0f1a71baa1
10 changed files with 51 additions and 13 deletions

View File

@ -2,6 +2,13 @@ addEventListener('fetch', event => {
event.respondWith(handleimg2ipfsRequest(event.request)); event.respondWith(handleimg2ipfsRequest(event.request));
}); });
/*
接口来自 https://www.nodeseek.com/post-158028-1
网友提供的免费IPFS上传接口
然后配合公共网关即可
另外建议配合使用 https://github.com/BlueSkyXN/WorkerJS_CloudFlare_ImageBed/blob/main/UserScript/ipfs-fix.js
*/
async function handleimg2ipfsRequest(request) { async function handleimg2ipfsRequest(request) {
console.log('Request received:', request.url); console.log('Request received:', request.url);

View File

@ -5,12 +5,12 @@ export default {
}; };
/* /*
参考了即刻图床开源的阿里接口 https://jike.info/topic/36748 参考了即刻图床开源的阿里接口 https://jike.info/topic/36748
需要使用美国等地访问 https://www.aliexpress.com/ 并使用第三方直接注册和登录,比如谷歌,如果访问地异常则不会出现第三方登录 需要使用美国等地访问 https://www.aliexpress.com/ 并使用第三方直接注册和登录,比如谷歌,如果访问地异常则不会出现第三方登录
该模块需要阿里国际账号虽然不需要实名可以随便注册但需要Cookie有效期不清楚有点像一个月 该模块需要阿里国际账号虽然不需要实名可以随便注册但需要Cookie有效期不清楚有点像一个月
这个试验我放在了KV库理论上也可以用D1库不用Env直接装载是因为Cookie有点长大概3KB而Env最大就5KB好像对于免费用户 这个试验我放在了KV库理论上也可以用D1库不用Env直接装载是因为Cookie有点长大概3KB而Env最大就5KB好像对于免费用户
你需要创建和绑定名为 WORKER_IMGBED 的库其中新建 K 字段名为 ali_express_cookie 然后在V中复制进去浏览器F12得到的完整Cookie即可 你需要创建和绑定名为 WORKER_IMGBED 的库其中新建 K 字段名为 ali_express_cookie 然后在V中复制进去浏览器F12得到的完整Cookie即可
返回图片示例为 https://ae01.alicdn.com/kf 的域名 返回图片示例为 https://ae01.alicdn.com/kf 的域名
*/ */
async function handleAliExpressRequest(request) { async function handleAliExpressRequest(request) {

View File

@ -2,6 +2,10 @@ addEventListener('fetch', event => {
event.respondWith(handleDa8mRequest(event.request)); event.respondWith(handleDa8mRequest(event.request));
}); });
/*
接口来自 https://mlw10086.serv00.net/pic/
*/
async function handleDa8mRequest(request) { async function handleDa8mRequest(request) {
console.log('Request received:', request.url); console.log('Request received:', request.url);

View File

@ -1,3 +1,8 @@
/*
参考了即刻图床开源的京东客服接口 https://jike.info/topic/36738
不过我是从对方提供的浏览器插件中找到的后来在论坛补到原文了
*/
async function handlejdkfRequest(request) { async function handlejdkfRequest(request) {
console.log('Request received for jdkf upload:', request.url); console.log('Request received for jdkf upload:', request.url);

View File

@ -3,11 +3,14 @@ addEventListener('fetch', event => {
}) })
// 示例格式 https://g.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg /*
// 兼容 https://qqq.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg 示例格式 https://g.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
// 兼容 https://os.i.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg 兼容 https://qqq.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
// 兼容 https://vac.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg 兼容 https://os.i.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
// 兼容 https://offline.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg 兼容 https://vac.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
兼容 https://offline.gtimg.cn/music/photo_new/T053XD001002t28e44Qc1ka.jpg
似乎屏蔽了CF的IP或者其他原因
*/
async function handle10086Request(request) { async function handle10086Request(request) {
console.log('Request received:', request.url); console.log('Request received:', request.url);

View File

@ -2,6 +2,10 @@ addEventListener('fetch', event => {
event.respondWith(handleQst8Request(event.request)); event.respondWith(handleQst8Request(event.request));
}); });
/*
接口来自 https://mlw10086.serv00.net/pic/
*/
async function handleQst8Request(request) { async function handleQst8Request(request) {
console.log('Request received:', request.url); console.log('Request received:', request.url);

View File

@ -1,5 +1,8 @@
// 参考了 https://github.com/k08255-lxm/WX-MT_Image/blob/main/upload_wechat.php /*
// 以及 https://github.com/x-dr/telegraph-Image/blob/main/src/app/api/tencent/route.js 参考了 https://github.com/k08255-lxm/WX-MT_Image/blob/main/upload_wechat.php
以及 https://github.com/x-dr/telegraph-Image/blob/main/src/app/api/tencent/route.js
最近应该是和谐了接口目前应该是不可用
*/
async function handleTencentRequest(request) { async function handleTencentRequest(request) {
try { try {

View File

@ -2,6 +2,10 @@ addEventListener('fetch', event => {
event.respondWith(handleTgphimgRequest(event.request)); event.respondWith(handleTgphimgRequest(event.request));
}); });
/*
接口来自 TGPH的Debug通道随时可能取消图片可能也没掉
*/
async function handleTgphimgRequest(request) { async function handleTgphimgRequest(request) {
// 确认请求方法为 POST 并且内容类型正确 // 确认请求方法为 POST 并且内容类型正确
if (request.method !== 'POST' || !request.headers.get('Content-Type').includes('multipart/form-data')) { if (request.method !== 'POST' || !request.headers.get('Content-Type').includes('multipart/form-data')) {

View File

@ -2,6 +2,10 @@ addEventListener('fetch', event => {
event.respondWith(handleTgphimgRequest(event.request)); event.respondWith(handleTgphimgRequest(event.request));
}) })
/*
接口来自 TGPH的原通道后来在TG老板被抓后取消
*/
async function handleTgphimgRequest(request) { async function handleTgphimgRequest(request) {
// 确认请求方法为 POST 并且内容类型正确 // 确认请求方法为 POST 并且内容类型正确
if (request.method !== 'POST' || !request.headers.get('Content-Type').includes('multipart/form-data')) { if (request.method !== 'POST' || !request.headers.get('Content-Type').includes('multipart/form-data')) {

View File

@ -2,6 +2,10 @@ addEventListener('fetch', event => {
event.respondWith(handleVviptuangouRequest(event.request)); event.respondWith(handleVviptuangouRequest(event.request));
}); });
/*
接口来自 https://mlw10086.serv00.net/pic/
*/
async function handleVviptuangouRequest(request) { async function handleVviptuangouRequest(request) {
console.log('Request received:', request.url); console.log('Request received:', request.url);