本文へスキップ

CF Workers Proxy

活発
jonssonyan/cf-workers-proxy

Cloudflare Workers の HTTP リバースプロキシサービス。制限を回避してブロックされたリソースにアクセスできます。

GitHub で見る
スター
957
フォーク
716
ウォッチ
957
未解決の Issue
3

この紹介文は現在英語版のみです。

CF Workers Proxy

CF Workers Proxy is a powerful HTTP reverse proxy service built on Cloudflare Workers. It enables you to bypass restrictions and access blocked resources through Cloudflare’s global network.

Core Features

  • HTTP Reverse Proxy: Seamlessly proxy HTTP requests through Cloudflare Workers
  • Custom Domain Support: Use your own domain for the proxy service
  • Request Filtering: Filter requests using regular expressions
  • Access Control: Implement IP, User-Agent, and region-based access control
  • Docker Registry Support: Special support for Docker registry mirroring
  • Debug Mode: Built-in debugging capabilities for troubleshooting
  • 302 Redirect: Support for custom redirect URLs

Common Use Cases

  • Accessing blocked websites and services
  • Creating Docker registry mirrors
  • Bypassing regional restrictions
  • Implementing custom access control
  • Setting up development proxies
  • Creating API gateways

Quick Start

  1. Deployment Options:

    • Workers Deployment: Copy _worker.js and deploy directly to Cloudflare Workers
    • Pages Deployment: Fork the repository and deploy through Cloudflare Pages
  2. Environment Variables:

    // Required
    PROXY_HOSTNAME = "github.com"  // Target hostname to proxy
    
    // Optional
    PROXY_PROTOCOL = "https"       // Protocol (http/https)
    PATHNAME_REGEX = "^/jonssonyan/" // Path regex filter
    UA_WHITELIST_REGEX = "(curl)"  // User-Agent whitelist
    UA_BLACKLIST_REGEX = "(curl)"  // User-Agent blacklist
    IP_WHITELIST_REGEX = "(192.168.0.1)" // IP whitelist
    IP_BLACKLIST_REGEX = "(192.168.0.1)" // IP blacklist
    REGION_WHITELIST_REGEX = "(JP)" // Region whitelist
    REGION_BLACKLIST_REGEX = "(JP)" // Region blacklist
    URL302 = "https://github.com/jonssonyan/cf-workers-proxy" // Redirect URL
    DEBUG = false                  // Debug mode
  3. Docker Registry Mirror Setup:

    # Configure Docker daemon
    mkdir -p /etc/docker
    cat >/etc/docker/daemon.json <<EOF
    {
      "registry-mirrors":["https://your-worker-domain.com"]
    }
    EOF
    
    # Restart Docker
    systemctl daemon-reload
    systemctl restart docker

Supported Registry Mirrors

  • Docker Hub: registry-1.docker.io
  • Kubernetes: k8s.gcr.io, registry.k8s.io
  • Quay: quay.io
  • Google Container Registry: gcr.io
  • GitHub Container Registry: ghcr.io
  • Cloudsmith: docker.cloudsmith.io
  • AWS ECR: public.ecr.aws

Security Considerations

  • Custom Domain: Always use a custom domain for your worker
  • Request Filtering: Implement strict path filtering
  • Access Control: Use IP and User-Agent filtering
  • Rate Limiting: Be aware of Cloudflare Workers limits
  • Legal Compliance: Ensure compliance with local regulations

Community

  • Telegram: jonssonyan_channel
  • YouTube: jonssonyan
  • Issues: Report bugs and request features on GitHub
  • Contributions: Pull requests are welcome!

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

共通のカテゴリとタグで順位付けした、似たオープンソースプロジェクトです。

すべてのネットワークプロジェクト →