跳到主要内容

Docker 中的 TunGo 服务器

1️⃣ 准备镜像

  • 🐳 官方镜像:
  docker pull nlipatov/tungo:latest
  • 🛠 或自行构建:

    cd src/
    docker buildx build -t nlipatov/tungo:latest .

2️⃣ 运行容器

docker run -d \
--name tungo \
--restart always \
--network host \
--device /dev/net/tun \
--cap-add NET_ADMIN \
-e EnableUDP=true \
-e EnableTCP=false \
-v tungo_volume:/etc/tungo \
nlipatov/tungo:latest

3️⃣ 生成客户端配置

docker exec tungo bash -c "tungo s gen"

您也可以使用容器 ID 代替容器名称。

📖 请参阅客户端设置了解后续步骤。