
查看系统命令:
1. git clone https://github.com/Nytai20108/freeroot.git
2. cd freeroot
3. bash noninteractive.sh
4. apt update
5. apt install neofetch -y && apt install screenfetch -y
6. neofetch
节点搭建全部命令:
1. 下载、解压并进入 Xray 目录的一整串核心命令:
# 下载并在内核中部署 Xray
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip
apt install unzip -y && unzip Xray-linux-64.zip -d ./xray
cd xray
2. 用来下载 Xray 核心主程序的 wget 命令
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip
3. 用来更新系统并安装 curl 下载工具的命令
apt update && apt install curl -y
4. 改用 curl 下载 Xray 核心主程序的命令
curl -L -O https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip
5. 用来解压 Xray 压缩包并直接进入解压后目录的连招命令
unzip Xray-linux-64.zip -d ./xray && cd xray
6. 在当前目录下创建一个 config.json 文件:
cat <<EOF > config.json
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"port": 12345,
"listen": "127.0.0.1",
"protocol": "vless",
"settings": {
"clients": [
{
"id": "a8f3b1c2-d4e5-f6a7-b8c9-d0e1f2a3b4c5",
"level": 0
}
],
"decryption": "none"
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/smjm"
}
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
EOF
7. 让 Xray 在后台不挂断运行,并将所有日志输出直接丢弃(不写盘占空间)的守护进程命令
nohup ./xray run -c config.json > /dev/null 2>&1 &
8. 用来安装网络工具包并查看当前系统端口监听状态(确认 Xray 是否成功启动并监听端口)的连招命令
apt install net-tools -y && netstat -lntp
9. 用来下载 Cloudflare Tunnel 客户端、赋予执行权限并直接启动内网穿透的连招命令
curl -L -o cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x cloudflared && ./cloudflared tunnel --url http://localhost:12345
10.为了绕过默认 UDP 风控限制、强制指定 http2 协议建立隧道连接的启动命令
./cloudflared tunnel --protocol http2 --url http://localhost:12345
休眠后拉起的命令:
第一步:重新把 Xray 跑起来
cd xray && ./xray
第二步:重新拉起内网穿透隧道
./cloudflared tunnel --protocol h2 --url http://localhost:12345
让 Xray 后台24小时常驻:
nohup ./xray > xray.log 2>&1 &
让 Cloudflare Tunnel 后台常驻:
nohup ./cloudflared tunnel --protocol h2 --url http://localhost:12345 > cf.log 2>&1 &


0 评论