{"repo":"jonssonyan/cf-workers-proxy","free":true,"listed":false,"github":"https://github.com/jonssonyan/cf-workers-proxy","clone":"git clone https://github.com/jonssonyan/cf-workers-proxy.git","description":"Cloudflare Workers HTTP 反向代理","language":"JavaScript","stars":948,"topics":["cloudflare","proxy","http"],"license":"GPL-3.0","category":"networking-infra","readme_excerpt":"Cloudflare Workers Proxy English / 简体中文 Cloudflare Workers HTTP 反向代理 建议自用，使用正则表达式过滤请求，并设置 worker 自定义域名，禁止代理全站，例如：GitHub，否则导致账号被官方风控概不负责 理论上支持代理任何被屏蔽的域名，只需要设置环境变量 PROXY HOSTNAME 为被屏蔽的域名，最后通过你的 worker 自定义域名访问即可 部署 - Workers 方式: 复制 worker.js ，在 Cloudflare 保存并部署 - Pages 方式: Fork 仓库，在 Cloudflare 连接 GitHub 一键部署 注意：大部分情况使用 worker.js 部署即可，但是部分代理地址要特殊处理，部署时请使用指定的文件 名称 文件 -------- -------------------------- 通用 worker.js Docker docker.js 环境变量 变量名 必填 默认值 示例 备注 ------------------------ ----- ------- ------------------------------------------------ --------------------- PROXY HOSTNAME √ github.com 代理地址 hostname PROXY PROTOCOL × https https 代理地址协议 PATHNAME REGEX × ^/jonssonyan/ 代理地址路径正则表达式 UA WHITELIST REGEX × (curl) User-Agent 白名单正则表达式 UA BLACKLIST REGEX × (curl) User-Agent 黑名单正则表达式 IP WHITELIST REGEX × (192.168.0.1) IP 白名单正则表达式 IP BLACKLIST REGEX × (192.168.0.1) IP 黑名单正则表达式 REGION WHITELIST REGEX × (JP) 地区白名单正则表达式 REGION BLACKLIST REGEX × (JP) 地区黑名单正则表达式 URL302 × https://github.com/jonssonyan/cf-workers-proxy 302 跳转地址 KEEP PATH × false false 302 跳转时保留 path DEBUG × false false 开启调试 镜像仓库加速 1. 将环境变量 PROXY HOSTNAME 设置为以下镜像仓库地址即可 镜像仓库 地址 ------------ ---------------------- docker registry-1.docker.io k8s-gcr k8s.gcr.io k8s registry.k8s.io quay quay.io gcr gcr.io ghcr ghcr.io cloudsmith docker.cloudsmith.io ecr public.ecr.aws 2. 设置 Docker 镜像仓库加速 将 https://dockerhub.xxx.com 替换为你的 worker 自定义域名 3. 查询镜像 - dockerhub.xxx.com：你的 worker 自定义域名 - image name：镜像名称 其他 Telegram Channel: https://t.me/jonssony","default_branch":null,"files":null,"tree":[],"storefront":"/r/jonssonyan","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jonssonyan/cf-workers-proxy/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}