cf-proxy-ex  by 1234567Yang

Cloudflare proxy for serverless deployment, DuckDuckGo/Libgen access

created 1 year ago
1,517 stars

Top 27.8% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a serverless proxy solution leveraging Cloudflare Workers, designed for users needing to bypass geo-restrictions, accelerate access to services like GitHub, and utilize AI chat functionalities (including GPT-4o/Claude 3) through services like DuckDuckGo. It offers a flexible way to deploy a personal proxy accessible from various platforms.

How It Works

The core of the project is a Cloudflare Worker script that acts as a reverse proxy. It intercepts requests, forwards them to the target URL, and returns the response. Key improvements over the original include removing the /proxy/ path prefix for cleaner URLs, automatically prepending http:// if missing, and handling 3XX redirects. It also modifies headers to replace proxy-specific information with target site details, converts relative paths to absolute paths for better resource loading, and scopes cookies to prevent data leakage and large cookie errors. Additionally, it injects XMLHttpRequest and fetch for form submission and adds a document monitor for dynamic link handling.

Quick Start & Requirements

  • Deployment: Primarily deployed on Cloudflare Workers. Instructions are provided for Deno and Cloudflare deployment.
  • Prerequisites: Cloudflare account, potentially Deno.
  • Recommendations: Enabling a security password via cookie is strongly advised to prevent scanning and scraping. Using unconventional subdomains (e.g., cdn.example.com instead of proxy.example.com) is recommended to reduce detection risk.
  • Resources: Setup involves deploying a Cloudflare Worker, which is generally quick.

Highlighted Details

  • Supports AI chat integration (GPT-4o/Claude 3) via DuckDuckGo.
  • Accelerates GitHub access.
  • Unlocks services like Libgen.
  • Handles cookie scoping and path conversion for improved compatibility and security.

Maintenance & Community

The project is actively maintained, with contributions acknowledged from users who have reported bugs and suggested improvements. It is based on gaboolic's cloudflare-reverse-proxy.

Licensing & Compatibility

Licensed under MIT License with additional conditions:

  • Attribution to the open-source link is required for any deployed proxy site.
  • Commercial use and profit from projects based on this work are prohibited.

Limitations & Caveats

This project is intended for learning the principles of online proxies and should not be used for illegal activities. Logging into websites via this proxy is strongly discouraged due to potential security risks, despite efforts to scope cookies.

Health Check
Last commit

2 weeks ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
6
Star History
131 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.