Skip to content

paricafe/misskey-media-proxy-worker

 
 

Repository files navigation

misskey-media-proxy-worker

A media files proxy worker for Misskey.

Usage

  1. Set your config items via environment variables in the ".env"
  2. Run npm run deploy to deploy your worker.

Features

  • More secure than the official one, can reduce the abusing.

  • Integrated cache and polish.

Config

Please use the environment variable to configure the proxy, you can configure them at Cloudflare's dashboard or in the wrangler.toml file.

[vars]
ALLOW_ORIGIN = "https://pwp.space"
PROXY_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.2109.1"
THIRD_PARTY_CLIENTS_USER_AGENT = ""
VALIDATE_PATHNAME = true
VALIDATE_SIGN = false
VALIDATE_REFERER = false
RETURN_EMPTY_PIC_WHEN_ERROR = false
BLACK_LIST_DOMAIN = ""

To set the PROXY_KEY, you can use the wrangler secret put command.

wrangler secret put PROXY_KEY [YOUR_PROXY_KEY]

Why proxy requests need a proxy key and signature?

See this issue for more details:

misskey-dev/media-proxy#9

License

MIT

About

A Cloudflare proxy worker for media files in Misskey

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%