我这大半生

  1. 首页
  2. 未分类
  3. 正文

在受限的VPS环境下 使用233boy的sing-box脚本

2024年9月19日 280点热度 1人点赞 0条评论

转自:

在受限的VPS环境下 使用233boy的sing-box脚本 (zelikk.blogspot.com)

 

 

在233boy的群里, 总是遇到有人在受限的VPS环境下安装失败.

看了不少失败的案例, 一般是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/www.cloudflare.com/gi' {} +

然后像原来一样的使用命令

具体解决过程

访问github资源的问题

用github proxy解决
https://ghproxy.lvedong.eu.org/

检测服务器IP失败的问题

查了一下源码,
https://github.dev/233boy/sing-box/blob/596efd56597ca63973dd1a0d3d03b13bac356fbc/install.sh#L190-L191

解决方案就是把 one.one.one.one 换成 www.cloudflare.com

可以使用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

问了一下GPT,

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/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/www.cloudflare.com/gi' {} +

 

 

标签: 暂无
最后更新:2024年9月19日

admin

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2024 我这大半生. ALL RIGHTS RESERVED.

本站由 YxVM 服务器 强力驱动