用Cloudflare worker反代blogspot实现免翻墙域名镜像站
反代前, 访问 https://zelikk.blogspot.com/1.html
得到
<html>
<body>
<a href="https://zelikk.blogspot.com/2.html">Page2</a>
<img src="https://blogger.googleusercontent.com/3.jpg">
</body>
</html>
反代后, 访问 https://one.eu.org/1.html
得到
<html>
<body>
<a href="https://one.eu.org/2.html">Page2</a>
<img src="https://img.one.eu.org/https://blogger.googleusercontent.com/3.jpg">
</body>
</html>
用1个worker反代图片 用成熟的uniporxy项目
用1个worker反代html (即本项目)
并对html内容进行替换
示例,
想反代的域名是 zelikk.blogspot.com
免翻墙的主域名是 one.eu.org 并且已经添加到 cloudflare
那么, 步骤如下:
名称 例如, blogimg
自定义域名 img.one.eu.org
代码 使用成熟的uniporxy项目
名称 例如, bloghtml
自定义域名 one.eu.org
代码 使用本项目的worker.js
代码开头的部分, 设置一些参数

你可以用不翻墙的浏览器访问 https://one.eu.org 了
比如, 部分博文不适合在墙内展示.
名称 例如, bloghtml_blocklist
添加
key = 你不想在墙内显示的path 如 /2023/06/racknerd-xray-reality.html
value = block

bloghtml worker 绑定KV
name KV_BLOCKLIST (不要改动)
value bloghtml_blocklist (就是前面步骤中建立的KV名字)

修改bloghtml worker的代码
数组 BLOCK_KEYWORDS 中添加你想屏蔽的path关键字.

我只根据关键字屏蔽path, 没有在html内容全文查找.