在受限的 VPS 环境下 使用 233boy 的 sing-box 脚本
在 233boy 的群里, 总是遇到有人在受限的 VPS 环境下安装失败.
访问
检测服务器
233boy
233boy
看了不少失败的案例, 一般是 2 个原因:
1. 访问 github 资源失败
2. 检测服务器 IP 失败
LT; DR
安装命令
bash <(wget -qO- -o- https://ghproxy.lvedong.eu.org/https://github.com/233boy/sing-box/raw/main/install.sh | sed s/one\.one\.one\.one/www\.cloudflare\.com/gi | perl -pe "$(curl -L https://ghproxy.lvedong.eu.org/perl-pe-para)")
维护, 在安装完成之后
find /etc/sing-box/sh -type f -name "*.sh" -exec sed -i 's/one\.one\.one\.one\/dns-query/dns.alidns.com\/resolve/gi' {} +find /etc/sing-box/sh -type f -name "*.sh" -exec sed -i 's/one\.one\.one\.one/www.cloudflare.com/gi' {} +
然后像原来一样的使用命令
* 补充, 处理DNS
具体解决过程
访问 github 资源的问题
用 github proxy 解决
https://ghproxy.lvedong.eu.org/
检测服务器 IP 失败的问题
查了一下源码,
https://github.dev/233boy/sing-box/blob/596efd56597ca63973dd1a0d3d03b13bac356fbc/install.sh#L190-L191
可以使用 sed 命令进行替换.
安装命令变成
bash <(wget -qO- -o- https://github.com/233boy/sing-box/raw/main/install.sh | sed s/one\.one\.one\.one/www\.cloudflare\.com/gi)
维护呢? 查了一下源码,
https://github.dev/233boy/sing-box/blob/596efd56597ca63973dd1a0d3d03b13bac356fbc/src/core.sh#L118
https://poe.com/s/e4f5JCcQ6o0ZwwKxBmFe
在安装完之后, 执行一下
find /etc/sing-box/sh -type f -name "*.sh" -exec sed -i 's/one\.one\.one\.one/www.cloudflare.com/gi' {} +
========
后记
同理可得
233boy 的 v2ray 脚本
安装命令
bash <(wget -qO- -o- https://ghproxy.lvedong.eu.org/https://git.io/v2ray.sh | sed s/one\.one\.one\.one/www\.cloudflare\.com/gi | perl -pe "$(curl -L https://ghproxy.lvedong.eu.org/perl-pe-para)")
维护, 在安装完成之后
find /etc/v2ray/sh -type f -name "*.sh" -exec sed -i 's/one\.one\.one\.one\/dns-query/dns.alidns.com\/resolve/gi' {} +find /etc/v2ray/sh -type f -name "*.sh" -exec sed -i 's/one\.one\.one\.one/www.cloudflare.com/gi' {} +
233boy 的 xray 脚本
安装命令
bash <(wget -qO- -o- https://ghproxy.lvedong.eu.org/https://github.com/233boy/Xray/raw/main/install.sh | sed s/one\.one\.one\.one/www\.cloudflare\.com/gi | perl -pe "$(curl -L https://ghproxy.lvedong.eu.org/perl-pe-para)")
维护, 在安装完成之后
find /etc/xray/sh -type f -name "*.sh" -exec sed -i 's/one\.one\.one\.one\/dns-query/dns.alidns.com\/resolve/gi' {} +
find /etc/xray/sh -type f -name "*.sh" -exec sed -i 's/one\.one\.one\.one/www.cloudflare.com/gi' {} +
* 补充, 处理
* 补充, 处理 DNS 解析问题的说明在此
https://zelikk.blogspot.com/2024/10/233boy-sing-box-dns.html