This is a Cloudflare Worker that mirrors to another HTTP connection.
- Proxy Server
- Git Repositories
- Docker Hub
- PyPI
- NPM
Run the following command to install dependencies:
bun install
Other package managers can be used as well.
To start a development server, run:
bun run dev
Or to deploy to Cloudflare Workers, run:
bun run deploy
Create file .dev.vars
at the root of the project and add the following content:
SIGN_SECRET="<your secret>" # This is the secret key for signature
For more information about secrets, please refer to Secrets - Cloudflare Workers docs.
Modify environment variables in wrangler.deploy.toml to match your configuration.
# The version of your worker
VERSION = "2.0.0"
# This is the identifier of your worker service
SERVICE_NAME = "cf-worker-mirrors"
# Subdomains will be matched based on this value
# i.e. For docker, the subdomain will be `docker.example.com`
DOMAINS = ["example.com"]
# Convert `text/html` Content-Type to `text/plain` on fallback proxy
FORBID_HTML = true
CopyRight (c) Cnily03. All rights reserved.
Licensed under the MIT License.