https://github.com/cnily03/cf-worker-mirrors
Proxy to another HTTP connection via cloudflare workers, including Docker Hub, Github.
https://github.com/cnily03/cf-worker-mirrors
cloudflare-worker docker-proxy dockerhub-mirror github-proxy mirror proxy-server
Last synced: 4 months ago
JSON representation
Proxy to another HTTP connection via cloudflare workers, including Docker Hub, Github.
- Host: GitHub
- URL: https://github.com/cnily03/cf-worker-mirrors
- Owner: Cnily03
- License: mit
- Created: 2024-06-16T04:31:10.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-08-03T01:06:46.000Z (9 months ago)
- Last Synced: 2024-08-03T03:13:36.833Z (9 months ago)
- Topics: cloudflare-worker, docker-proxy, dockerhub-mirror, github-proxy, mirror, proxy-server
- Language: TypeScript
- Homepage:
- Size: 76.2 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloudflare Worker - Mirrors
This is a Cloudflare Worker that mirrors to another HTTP connection.
[](https://deploy.workers.cloudflare.com/?url=https://github.com/Cnily03/cf-worker-mirrors)
## Supported sites
- [x] Proxy Server
- [x] Git Repositories
- [x] [Docker Hub](https://hub.docker.com)
- [ ] [PyPI](https://pypi.org)
- [ ] [NPM](https://www.npmjs.com)## Getting Started
### Installation
Run the following command to install dependencies:
```bash
bun install
```Other package managers can be used as well.
To start a development server, run:
```bash
bun run dev
```Or to deploy to Cloudflare Workers, run:
```bash
bun run deploy
```### Configuration
Create file `.dev.vars` at the root of the project and add the following content:
```env
SIGN_SECRET="" # This is the secret key for signature
```For more information about secrets, please refer to [Secrets - Cloudflare Workers docs](https://developers.cloudflare.com/workers/configuration/secrets/).
Modify environment variables in [wrangler.deploy.toml](./wrangler.deploy.toml) to match your configuration.
```toml
# 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
```## License
CopyRight (c) Cnily03. All rights reserved.
Licensed under the [MIT](./LICENSE) License.