Skip to content

Black-Parrot-Official/cloudflare-website-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Cloudflare Worker Proxy

This Cloudflare Worker acts as a proxy to dynamically fetch and display content from a specified website within the worker's domain.

Features

  • Proxy Functionality: Fetches content from a target website and displays it within the worker.
  • URL Rewriting: Rewrites URLs in the fetched content to ensure they point correctly to the worker's domain.
  • CORS Support: Adds CORS headers to allow cross-origin requests.

Setup

  1. Cloudflare Account:

    • Ensure you have a Cloudflare account set up.
  2. Cloudflare Workers:

    • Go to the Cloudflare dashboard and navigate to Workers.
  3. Create a New Worker:

    • Create a new worker and paste the provided script.
  4. Configuration:

    • Open the script and replace 'example.com' with the domain of the website you want to proxy. This should be done in the following line:
      const targetHost = 'example.com'; // Replace with the target website
  5. Deploy:

    • Save and deploy your worker.

Usage

  • Access your Cloudflare Worker URL to see the proxied content of the target website.

Security Considerations

  • Respect the terms of service and usage policies of the target website.
  • Ensure compliance with data protection and privacy regulations.

Contributing

Contributions are welcome! Please fork this repository and submit a pull request with your improvements.

License

This project is licensed under the MIT License.

About

This Cloudflare Worker script allows you to create a proxy server that fetches and displays content from a specified website. The primary function of this script is to act as an intermediary between the user and the target website, effectively masking the user's IP address and the origin server's IP address.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors