add odcker support

This commit is contained in:
zizifn
2023-03-07 13:54:04 +08:00
committed by zizifn
parent f1725c7539
commit cf1d5a1c5a
3 changed files with 10 additions and 0 deletions

View File

@@ -7,4 +7,6 @@ WORKDIR /app
COPY dist dist/
EXPOSE 4100
CMD [ "node", "./dist/apps/node-vless/main.js" ]

View File

@@ -42,6 +42,13 @@ https://blog.cloudflare.com/introducing-socket-workers/
很多 Node.js 的平台都是支持 docker 的,所以可以直接部署原版。但是既然很多人要,我就写一个。我目前仅仅维护 render 平台的文档。理论上其他平台都一样。
### Docker
``` bash
docker run -d -p 4600:4100 -e UUID=ce6d9073-7085-4cb1-a64d-382489a2af94 zizifn/node-vless:latest
```
> 如果你想让 DNS IPV4 优先, 请设置环境变量DNSORDER=ipv4first
### render.com
[render](./doc/render.md)

View File

@@ -254,6 +254,7 @@ async function connect2Remote(port, host, log: Function): Promise<Socket> {
{
port: port,
host: host,
// https://github.com/nodejs/node/pull/46587
// autoSelectFamily: true,
},
() => {