0元免费领取!codesandbox 神级VPS!无需实名!无需信用卡!4核8G+千兆网速,一键部署高速节点!永久保活,无限流量!YouTube 秒开8K 完美解锁chatgpt 奈飞 X
免费节点的终极形态!0元白嫖 CodeSandbox 搭建 Xray 节点!免域名/免服务器,一键脚本3分钟搞定!
视频教程:在 YouTube 上观看
codesandbox官网链接请见文末原文。
实测配置数据:
操作系统:Debian,内核版本 Linux 6.1.43
CPU:AMD EPYC 四核心,主频 3.1GHz
内存:8G,当前已用 3.3G
磁盘空间:总容量 30G,已使用 14G
一键脚本(自动部署 + 抓取临时域名)
在 CodeSandbox 的终端(`zsh`)中直接粘贴并运行以下整合脚本:
# 1. 创建并进入工作目录
mkdir -p ~/xray && cd ~/xray
# 2. 下载并解压 Xray 核心(如已存在则跳过)
if [! -f "xray"]; then
curl -L -o xray.zip https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip
unzip -o xray.zip
fi
# 3. 下载 cloudflared 临时隧道客户端(如已存在则跳过)
if [! -f "cloudflared"]; then
curl -L -o cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64
chmod +x cloudflared
fi
# 4. 清理残留进程
pkill -f xray
pkill -f cloudflared
# 5. 自动生成包含 "decryption": "none" 的标准 Xray 配置文件与随机 UUID
python3 -c "
import uuid, json
new_uuid = str(uuid.uuid4())
config = {
'inbounds': [{
'port': 8080,
'protocol': 'vless',
'settings': {
'clients': [{'id': new_uuid}],
'decryption': 'none'
},
'streamSettings': {
'network': 'ws',
'wsSettings': {'path': '/ws'}
}
}],
'outbounds': [{'protocol': 'freedom'}]
}
with open('config.json', 'w') as f:
json.dump(config, f, indent=2)
print('NEW_UUID=' + new_uuid)
" > /tmp/xray_env.sh
source /tmp/xray_env.sh
# 6. 后台启动 Xray 核心服务
nohup./xray run -config config.json >/dev/null 2>&1 &
# 7. 后台启动 Cloudflare 临时隧道(转发本地 8080 端口)
rm -f cloudflared.log
nohup./cloudflared tunnel --url http://localhost:8080 > cloudflared.log 2>&1 &
echo "⏳ 正在生成 Cloudflare 临时隧道域名,请稍等 5 秒..."
sleep 5
# 8. 自动抓取分配到的 trycloudflare.com 临时域名并输出节点链接
DOMAIN=$(grep -oE 'https://[a-zA-Z0-9-]+\.trycloudflare\.com' cloudflared.log | head -n 1 | sed 's|https://||')
if [ -n "$DOMAIN"]; then
echo "=========================================================="
echo "🎉 部署成功!"
echo "🔗 分配的临时域名:${DOMAIN}"
echo "🔑 本次生成的 UUID:${NEW_UUID}"
echo "=========================================================="
echo "👉 最新 VLESS 一键导入链接:"
echo "vless://${NEW_UUID}@${DOMAIN}:443?encryption=none&security=tls&type=ws&host=${DOMAIN}&sni=${DOMAIN}&path=%2Fws#CF-QuickTunnel-Node"
echo "=========================================================="
else
echo "❌ 临时域名提取超时,请手动输入 cat ~/xray/cloudflared.log 查看日志"
fi
维护与状态查看
查看当前分配的临时域名与链接:
cat ~/xray/cloudflared.log | grep trycloudflare.com
检查进程状态:
ps aux | grep -E 'xray|cloudflared'
重启临时隧道(会更新域名):
pkill -f cloudflared
rm -f ~/xray/cloudflared.log
cd ~/xray && nohup./cloudflared tunnel --url http://localhost:8080 > cloudflared.log 2>&1 &
sleep 5
cat ~/xray/cloudflared.log | grep trycloudflare.com
v2rayN下载、批节点生成器、优选域名、本地优选链接请见文末原文。
保活脚本
在终端中运行一个后台 Shell 脚本,每隔一段时间请求一次本地 Xray 端口或外部网络。这样可以产生持续的系统与网络活动:
nohup bash -c 'while true; do curl -s http://localhost:8080/ws > /dev/null; sleep 120; done' >/dev/null 2>&1 &
查看保活进程是否在运行:
ps aux | grep "while true"
手动停止保活进程:
pkill -f "while true"
# 在终端末尾追加保活
nohup bash -c 'while true; do curl -s http://localhost:8080/ws > /dev/null; sleep 120; done' >/dev/null 2>&1 &
注意事项
更多资源分享链接
温馨提示:本站资源,仅供学习和交流使用,严禁商用,所有软件和资源都有时效性,苹果软件伪装上架的会短期内下架,如果遇到失效的请等待下次上架,或反馈给博主,如果给您带来帮助请转发给您身边的朋友或者朋友圈
原文链接:https://kjgx668.blogspot.com/2026/08/0codesandbox-vps48gyoutube-8k-chatgpt-x.html