Linux 系统配置
Linux上推荐使用ShellClash 具有很强的支持性与兼容性, 推荐使用!
项目地址: ShellClash
兼容性
- 支持各种基于OpenWrt或使用OpenWrt二次定制开发的路由器设备
- 支持各种运行标准Linux系统(如Debian/CenOS/Armbian等)的设备
- 兼容Padavan固件(保守模式)、潘多拉固件以及华硕/梅林固件
- 兼容各类使用Linux内核定制开发的各类型设备
常见问题:
ShellCrash常见问题准备工作
使用linux, 建议拥有linux基础与网络基础
运行时的额外 依赖:
大部分的设备/系统都已经预装了以下的大部分依赖,使用时如无影响可以无视之
curl/wge 必须 全部缺少时无法在线安装及更新,无法使用节点保存功能
iptables/nftables 重要 缺少时只能使用纯净模式
crontab 较低 缺少时无法启用定时任务功能
net-tools 极低 缺少时无法正常检测端口占用
ubus/iproute-doc 极低 缺少时无法正常获取本机host地址
使用方式:
-
确认设备已经开启SSH并获取root权限(带GUI桌面的Linux设备可使用自带终端安装)
-
使用SSH连接工具(如putty,JuiceSSH,系统自带终端等)路由器或Linux设备的SSH管理界面或终端界面
-
之后在SSH界面执行目标设备对应的安装命令,并按照后续提示完成安装
在线安装:
(如无法连接或出现SSL连接错误,请尝试更换各种不同的安装源!)
标准Linux设备安装:
sudo -i #切换到root用户,如果需要密码,请输入密码
bash #如已处于bash环境可跳过
export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && bash /tmp/install.sh && source /etc/profile &> /dev/null
或者
sudo -i #切换到root用户,如果需要密码,请输入密码
bash #如已处于bash环境可跳过
export url='https://gh.jwsc.eu.org/master' && bash -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
路由设备使用curl安装:
#GitHub源(可能需要代理)
export url='https://raw.githubusercontent.com/juewuy/ShellCrash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
或者
#jsDelivrCDN源
export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
或者
#作者私人源
export url='https://gh.jwsc.eu.org/master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
路由设备使用wget安装:
#GitHub源(可能需要代理)
export url='https://raw.githubusercontent.com/juewuy/ShellCrash/master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
或者
#jsDelivrCDN源
export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
老旧设备使用低版本wge安装:
#作者私人http内测源
export url='http://t.jwsc.eu.org' && wget -q -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
虚拟机/Docker环境安装:
虚拟机或Docker 环境推荐使用Alpine镜像安装
这里以Docker为例(其他虚拟机请自行查找安装Alpine镜像安装教程)
#注意,以下命令请分步执行!
#Docker一键启动Alpine镜像
docker run -d --name ShellCrash alpine sleep infinity
#进入容器内sh环境
docker exec -it ShellCrash sh
#安装必要依赖
apk add curl
apk add nftables
#执行安装命令
export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
本地安装:
如使用在线安装出现问题,请参考:本地安装ShellCrash的教程 使用本地安装!
使用脚本:
安装完成管理脚本后,执行如下命令使用~
crash #进入对话
crash -h #帮助列表
clash -u #卸载脚本
clash -t #测试模式运行