ghproxy 修改脚本内容 修改aff 修改下载的文件

前言 之前我们实现了 ghproxy 对 github 脚本的内容进行分析并修改, 给所有的 github 链接再套上 ghproxy 刚刚有了个想法, ghproxy修改内容还能实现什么?

极简 GitHub Porxy 支持GitHub脚本的无限嵌套调用

前言 当我看到这个DD系统的项目时 https://github.com/bin456789/reinstall 我被它的安装命令吸引了. curl -O https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh || wget -O ${_##*/} $_ 找GPT解析了一下原理, 是为了考虑到有些linux系统默认有wget,有些默认有curl . 我准备把 我的极简一键脚本 的安装方式都改成这样 . curl -LO https://github.com/crazypeace/xray-vless-reality/raw/main/install.sh || wget -O ${_##*/}$_ && bash install.sh 4 8443 然后在脚本的一开始, 安装 curl 和 wget. apt-get -y install curl wget -qq 我倾向于显示错误内容, 这样在小白反馈问题的时候, 直接发截图或日志就行了. 所以curl和wget没有加静默参数. 复杂的脚本命令, 在结合我的ghproxy时, 如果要实现嵌套github脚本调用, 现有的方案会比较难处理. 我准备改用 WJQSERVER-ghproxy 的思路. 在ghproxy 本身的处理过程中, 针对  .sh 的资源, 全量查找替换, 把访问github资源的链接, 都再套一次自己 ghproxy. 然后再返回. 新建一个 github proxy 项目名 ghproxy 不影响 原来使用 gh-proxy 的用户.

把我的 ghproxy 以python的方式运行一个后端

==== update ==== 新项目在github proxy内部处理github脚本嵌套调用的问题 Github项目 https://github.com/crazypeace/ghproxy 搭建过程大同小异  在项目README中有描述

GitHub Proxy 更新 支持在一行内 wget 下载再执行的形式

现象 一直以来, 在各种地方不断地看到在不同的环境下跑Github脚本不成功的网友. 有些一键脚本的作者为了美观( 装B )会带上不显示错误信息的参数, 比如 wget -q 和 curl -s 这样, 如果出错就一点显示都没有. 对不懂的小白来说, 连用微信扫一扫翻译错误信息的机会都没有. 比如, 这位仁兄

GitHub Proxy 跑在 Replit 上面, wget 获取是乱码, 使用 --compression=auto 参数解决问题

现象 GitHub Proxy 跑在  Replit  上面, wget 获取是乱码, curl 获取正常 在replit上搭建 GitHub Proxy 的教程看以前写的 使用方法: wget -O- https://ghproxy.crazypeace.repl.co/https://git.io/v2ray.sh 效果是乱码 同样的网址, 用curl获取就是正常的. curl -L https://ghproxy.crazypeace.repl.co/https://git.io/v2ray.sh 同样的Github Proxy项目, 搭在Cloudflare worker上面, 用wget获取也是正常的. wget -O- https://ghproxy.crazypeace.workers.dev/https://git.io/v2ray.sh

简化操作 生成调用github代理的命令 解决使用github脚本时遇到的各种访问github出错的问题

之前写过一篇 用github代理来解决使用github脚本时遇到的各种访问github出错的问题 . 但是方法看起来比较复杂, 可能除了我没人愿意这么用.  所以做成了一个页面, 可以由 cloudflare 的 worker 调用. 这样使用者就只剩下鼠标点点点了. 演示视频:

sed不支持非贪婪匹配 改用perl

问题 之前   Free.vps.vc 访问GitHub资源出错 用GithubProxy代理 用sed修改脚本内容 实践: bash <(curl -L  https://github.crazypeace.workers.dev/ https://github.com/crazypeace/v2ray_wss/raw/main/install.sh   | sed -E "$(curl -L  https://github.crazypeace.workers.dev/ https://github.com/crazypeace/gh-proxy/raw/master/sed-E-para )" ) 发现这个处理方法并不完美。 用grep github把涉及修改的地方输出一下。 curl -L  https://github.crazypeace.workers.dev/ https://github.com/crazypeace/v2ray_wss/raw/main/install.sh   | sed -E "$(curl -L  https://github.crazypeace.workers.dev/ https://github.com/crazypeace/gh-proxy/raw/master/sed-E-para )" | grep github 发现,.sh 的部分, bash <(curl -L https://github.crazypeace.workers.dev/ https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh | sed -E "$(curl -L https://github.com/crazypeace/gh-proxy/raw/master/sed-E-para)" ) --version 4.45.2 只在前面加了 github proxy,后面调用 GitHub 资源的部分并没有处理。

GitHub Proxy 支持 api.github.com

在使用GitHub Proxy代理 warp 脚本时,发现在调用api.github.com时报错。 经查, gh-proxy 没有加入对api.github.com的支持 https://github.com/hunshcn/gh-proxy/issues/44 那么就自己加一下吧。 修改内容很简单,前面部分,过滤格式增加一行 const exp7 = /^(?:https?:\/\/)?api\.github\.com\/.+?\/.+?\/.*$/i 后面部分,判断格式的地方加一个 || path.search(exp7) === 0  ====== 完 Github:  https://github.com/crazypeace/gh-proxy ====== 实例 bash <(curl  https://github.crazypeace.workers.dev/ https://raw.githubusercontent.com/P3TERX/warp.sh/main/warp.sh   | perl -pe "$(curl -L  https://github.crazypeace.workers.dev/ https://github.com/crazypeace/gh-proxy/raw/master/perl-pe-para )" ) 4

在IPv6 only Free.VPS.vc VPS访问GitHub一键脚本失败的时候,用GitHub Proxy解决问题

原理: Free.vps.vc 访问GitHub资源出错 用GithubProxy代理 用sed修改脚本内容 sed不支持非贪婪匹配 改用perl

Free.vps.vc 访问GitHub资源出错 用GithubProxy代理 用sed修改脚本内容

问题 Free.vps.vc 访问GitHub资源出错

Shell脚本支持同时使用多个参数 shift移动参数列表

在前面的修改中,我们的脚本已经支持了gh-proxy参数。 但是warp脚本还支持比如 4, 6, s5 等参数比较方便使用,不用在菜单里选了。 所以我们的脚本能支持多个参数就好了。 这里就要用到 shift 来移动参数列表

Shell脚本支持设置gh-proxy参数 解决raw.githubusercontents.com command not found问题

最近在hax woiden上访问带S的raw.githubusercontent s .com脚本会报错command not found 原因是raw.githubusercontent s .com并非官方服务,现在这个服务临时关闭了。 使用自建 gh-proxy 可以解决访问脚本的问题,但是脚本里面再访问github资源怎么办呢? 所以脚本需要支持带gh-proxy的参数,在脚本里面访问github资源的时候前面加上gh-proxy

使用Cloudflare Worker自建GitHub Proxy代理 解决raw.githubusercontents.com command not found问题

最近在hax woiden上访问带S的raw.githubusercontent s .com脚本会报错command not found 现象如下: /dev/fd/63: line 1: $'\347\275\221\347\253\231\347\273\264\346\212\244\343\200\202': command not found /dev/fd/63: line 1: 网站维护。: command not found 查了一下,这个服务并不是GitHub官方的,目前暂停了。 消息源: https://github.com/7ednet/yard/discussions/11 所以我们需要搭一个自己的GitHub代理。