注册网址
1. 创建文件:Dockerfile
FROM alpine:latest
RUN apk add --no-cache wget tar
WORKDIR /app
# 下载 sing-box 官方程序
RUN wget https://github.com/SagerNet/sing-box/releases/download/v1.10.1/sing-box-1.10.1-linux-amd64.tar.gz && \
tar -zxvf sing-box-1.10.1-linux-amd64.tar.gz && \
mv sing-box-1.10.1-linux-amd64/sing-box . && \
rm -rf sing-box-1.10.1-linux-amd64*
COPY config.json .
EXPOSE 8080
CMD ["./sing-box", "run", "-c", "config.json"]
2. 创建文件:config.json
请将 你的UUID 替换为自己的UUID
{
"log": { "level": "info" },
"inbounds": [{
"type": "vless",
"tag": "vless-in",
"listen": "::",
"listen_port": 8080,
"users": [{ "uuid": "你的UUID" }],
"transport": { "type": "ws", "path": "/chat" }
}],
"outbounds": [{ "type": "direct", "tag": "direct" }]
}
使用说明
在 Github 仓库创建以上两个文件,把 config.json 里面的 UUID 换成自己的即可使用。
vless://你的UUID@你的域名:443?encryption=none&security=tls&type=ws&host=你的域名&path=%2fchat&sni=你的域名#Back4App_项目名称

文章评论 (1)
不行
回复删除发表评论