GithubHelp home page GithubHelp logo

cloudflare-proxy-sites's Introduction

Cloudflare Proxy Sites

A powerful and easy-to-use website mirroring tool based on Cloudflare Workers.

Proxy Sites: Vercel Version

https://github.com/seadfeng/vercel-proxy-sites

๐ŸŒŸ Key Features

  • ๐Ÿ†“ Free to use
  • ๐ŸŒ Mirror any website with ease
  • ๐Ÿš€ Quick deployment using Wrangler
  • ๐Ÿ”— Support for multiple domains
  • ๐Ÿค– Automated deployment via GitHub Actions
  • ๐Ÿ›ก๏ธ Enhanced privacy and security
  • ๐ŸŒ Bypass geographical restrictions
  • โšก Improved access spee

Two Types of Proxy Modes

  • Single-Site Reverse Proxy
  • Multi-Site Reverse Proxy

Single-Site

You can use the workers.dev subdomain to access without needing your own domain. When deploying, configure the targetDomain variable.

// workers.dev/index.js
// replace to your target site domain
const targetDomain = 'example.com';

Code: workers.dev/index.js

Multi-Site

You need to have your own domain. The proxy site will be automatically recognized based on the domain name. After deployment, you only need to add custom domains according to the rules. Configure the ownDomain variable when deploying.

// index.js
// replace to your domain
const ownDomain = "example.com";

The domain consists of two parts: target domain and own domain. For example:

Proxy site address: https://www.proxysites.ai.serp.ing

Code: index.js

www.proxysites.ai.serp.ing.png

Local Deploy

1. install wrangler

npm i -g wrangler

2. Configure your own domain - Important!

// index.js
// replace to your domain
const ownDomain = "example.com";

Use workers.dev default domain?

This method only support single domain reverse proxy.

Here is the code:

workers.dev/index.js

// workers.dev/index.js
// replace to your target site domain
const targetDomain = 'example.com';

Get your workers.dev visit:

workers.dev domain

3. deploy to workers

# Login
wrangler login

# Deploy
wrangler deploy

Or Deploy by Workflows

To automate your deployment process, you can use GitHub Actions or a similar CI/CD tool. Below are the steps to set up your deployment workflow and the necessary GitHub secrets:

Configure GitHub Secrets

Add GitHub Secrets

Store sensitive information as secrets in your GitHub repository. Navigate to your repository settings and add the following secrets:

  • CLOUDFLARE_API_TOKEN: Your Cloudflare API token. This token should have permissions to deploy and manage your Cloudflare Workers.
  • CLOUDFLARE_ACCOUNT_ID: Your Cloudflare account ID.

To add secrets:

  • Go to your repository on GitHub.
  • Click on "Settings" in the top menu.
  • Select "Secrets" from the sidebar.
  • Click on "New repository secret" to add each secret.

Manual Cloudflare Setup

For detailed instructions, see this guide

Configure Workers for Proxy Site

eg.

My root domain is serp.ing,

proxy sites www.proxysites.ai, www.serpchecking.com

1. Go Workers & Pages

Make sure you have deployed to Workers

Workers & Pages

2. Add a custom domain for your Worker.

Support multiple domain names, the following only set up a as an example

Add a custom domain

3. Done

Ensure the certificate is active.

Domain config

๐Ÿค– robots.txt Configuration

Default configuration (recommended for privacy):

// index.js
const robots = `User-agent: *
Disallow: /
    `;

โš ๏ธ Warning: Modifying this may affect the indexed content of the mirrored site.

๐Ÿ“œ Disclaimer

This tool is for educational and personal use only. Users are responsible for complying with all applicable laws and regulations. The developers are not liable for any misuse or legal consequences.

๐Ÿค Contributing

Contributions are welcome! Feel free to submit issues or pull requests.

cloudflare-proxy-sites's People

Contributors

seadfeng avatar

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.