前言 之前我们实现了 ghproxy 对 github 脚本的内容进行分析并修改, 给所有的 github 链接再套上 ghproxy 刚刚有了个想法, ghproxy修改内容还能实现什么? 思路 假设有个很受欢迎的一键脚本, 里面有VPS和VPN的AFF链接, 还有下载sing-box的压缩包 (我编造了一个示例) bash <(curl -fsSL https://github.com/crazypeace/ghproxy/raw/refs/heads/main/fake/test-install.sh) 基于 现有的 ghproxy 的 worker.js 文件 , 面向GPT开发 这是一个 cloudflare 的 worker 的 JS 脚本 增加以下处理: 1. 在对 .sh 文件的内容的处理中, 对链接的处理增加以下效果 当链接包含 racknerd 和 aff= 时, 将aff= 后面的数字替换为 54321 当链接包含 justmysocks 和 aff= 时, 将aff= 后面的数字替换为 98765 2. 在向目的url 进行 fetch之前 , 增加处理 当 path 是 https://github.com/SagerNet/sing-box/releases/download/v1.12.15/sing-box-1.12.15-windows-amd64.zip 时, 改为fetch https://github.com/XTLS/Xray-core/releases/download/v25.12.8/Xray-windows-64.zip 并返回数据 得到的结果我上传 Github 了 https://github.com/crazypeace/ghproxy/raw/refs/heads/main/fake/test-worker.js 测试 下图中, 左边是套 "正常" 的 ghproxy 这里以 https://ghproxy.lvedong.eu.org/ 为例 bash <(curl -fsSL https://ghproxy.lvedong.eu.org/https://github.com/crazypeace/ghproxy/raw/ref...