Skip to content

crazypeace/cf-worker-proxy-blogspot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

cf-worker-proxy-blogspot

用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

那么, 步骤如下:

域名 one.eu.org 设置自动TLS

firefox_2025-09-30_22-36-23

建第1个worker

名称 例如, blogimg
自定义域名 img.one.eu.org
代码 使用成熟的uniporxy项目

建第2个worker

名称 例如, bloghtml
自定义域名 one.eu.org
代码 使用本项目的worker.js
代码开头的部分, 设置一些参数
chrome_2025-10-02_01-33-34

部署完成

你可以用不翻墙的浏览器访问 https://one.eu.org

如果你想屏蔽部分path

比如, 部分博文不适合在墙内展示.

建1个KV

名称 例如, bloghtml_blocklist
添加
key = 你不想在墙内显示的path 如 /2023/06/racknerd-xray-reality.html
value = block
firefox_2025-10-01_16-44-21

绑定KV

bloghtml worker 绑定KV
name KV_BLOCKLIST (不要改动)
value bloghtml_blocklist (就是前面步骤中建立的KV名字)
2025-10-02_01-39-33

根据关键字屏蔽path

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

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

About

用Cloudflare worker反代blogspot实现免翻墙域名镜像站

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors