Coder Social home page Coder Social logo

rongronggg9 / rsstt-img-relay Goto Github PK

View Code? Open in Web Editor NEW
42.0 2.0 38.0 80 KB

Media (image, video, etc) relay on Cloudflare Workers/Pages, used by https://github.com/Rongronggg9/RSS-to-Telegram-Bot

License: MIT License

JavaScript 100.00%
cloudflare cloudflare-pages cloudflare-workers relay relay-server serverless media multimedia

rsstt-img-relay's Introduction

English | 简体中文

Note: Block a large number of requests, please deploy yourself


🧡 cors (Cloudflare Workers)

Support cross-domain request
Convert HTTP to HTTPS

Usage

https://example.com/{URL}

  • https://example.com/https://api.github.com
  • https://example.com/http://nginx.org/download/nginx-1.20.2.tar.gz
// Copy to the console and run
var $url = "http://wthrcdn.etouch.cn/weather_mini?citykey=101040100";
fetch("https://example.com/" + $url).then(x => x.text()).then(console.log)

Deploy

The mechanism of both methods is the same

wrangler

  • Clone the project and enter the cors directory
  • Edit index.js and wrangler.toml (configuration key)
  • wrangler config configure mailbox and key
  • wrangler build build
  • wrangler publish release
  • Detailed documentation: https://developers.cloudflare.com/workers/quickstart

Cloudflare Dashboard

  • Turn to Cloudflare Dashboard, then switch to the Workers tab
  • Create a service
  • Quick edit
  • Clear the editor
  • Copy the code from cors/index.js to the editor (if you don't care about logging, pages/_worker.js is another choice)
  • Edit the configurations if necessary
  • Save and Deploy

Price

CPU Daily request Burst rate Script size
10ms 100,000 1000 requests in 10 minutes 1M after compression

Details: https://developers.cloudflare.com/workers/about/limits/

The amount can't hold up, please use your account to build the service if you use a lot, thank you! ! !
overflow


🧡 pages (Cloudflare Pages Functions)

Usage

https://example.com/{URL}

  • https://example.com/https://api.github.com
  • https://example.com/http://nginx.org/download/nginx-1.20.2.tar.gz

Deploy

The mechanism of both methods is the same

wrangler

npm install wrangler@beta # install
npx wrangler pages dev --help # View help (nodejs version >= 16.x)
npx wrangler pages dev ./ # Enter the pages directory and run

Details: https://developers.cloudflare.com/pages/platform/functions

Cloudflare Dashboard

  • Fork this repository
  • Edit the configurations in pages/_worker.js if necessary
  • Turn to Cloudflare Dashboard, then switch to the Pages tab
  • Create a project ▼ -> Connect to Git
  • Connect to your GitHub account, then select the fork created just now
  • Begin setup
  • Fill in Build settings: Framework preset - None; Build command - leave it blank; Build output directory - pages
  • Save and Deploy

Limit

The total number of invocation requests per day is capped at 100,000. If the daily limit is reached, Pages will stop executing the function and fall back to providing only static resources.


Source

rsstt-img-relay's People

Contributors

ipatpat avatar netnr avatar rongronggg9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rsstt-img-relay's Issues

请问如何在RSSHub中使其对微博路由中的视频生效?

按照文档所说的方法配置后,对于视频的处理并未生效。
image
image

且将部署的rsstt-img-relay服务的网址后面添加微博视频的链接,提示:
{"code":415,"msg":"The keyword \"image , video , audio , application , font , model\" was whitelisted by the operator of this proxy, but got \"text/html\"."}

请问是否有方法解决?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.