# Know ShadowTLS too late

> A Docker Compose deployment guide for ShadowTLS V3 with Shadowsocks or Snell, offering a more compatible alternative to Snell for users without Surge.

Author: Vincent Yang
Published: 2025-05-05
Tags: ShadowTLS
Source: https://missuo.me/posts/shadowtls

---

正如标题写的那样，**ShadowTLS 相见恨晚**。

偶然在 Mihomo 的 Issue 里面看到作者说 ShadowTLS 还很稳，所以没必要支持 XHTTP。看了一下 ShadowTLS 的作者竟然是我关注了很久的大佬 [ihc](https://github.com/ihciah)。

看了一下 GitHub 的文档，发现部署 ShadowTLS 其实非常简单。我尝试在日本 IIJ 的服务器上部署了一下，发现速度很不错。并且 Surge 和 Shadowrocket 都支持 ShadowTLS。之前一直在用 Snell，但是苦于 Snell 必须要依赖 Surge，很难分享给没有 Surge 的朋友使用。ShadowTLS 刚好解决了这个问题。

由于 老刘没有提供 Snell Server 的 Docker Image，我在 [geekdada/snell-server-docker](https://github.com/geekdada/snell-server-docker) 的基础上改进了一下，支持了 Github Actions 的自动构建，并且支持了更多的环境变量。

## 如何部署

本文只介绍如何使用 Docker Compose 部署 ShadowTLS + Shadowsocks 和 ShadowTLS + Snell。

[https://github.com/missuo/snell-server-docker](https://github.com/missuo/snell-server-docker)

### ShadowTLS + Shadowsocks

```bash
# Create directory and navigate to it
mkdir shadowtls-shadowsocks
cd shadowtls-shadowsocks

# Download compose file
wget -O compose.yaml https://raw.githubusercontent.com/missuo/snell-server-docker/refs/heads/master/compose-shadowsocks.yaml

# Generate random password for enhanced security
openssl rand -base64 32

# Edit the compose file with your configuration
nano compose.yaml

# Start the containers
docker compose up -d

# Check logs
docker compose logs
```

### ShadowTLS + Snell

```bash
# Create directory and navigate to it
mkdir shadowtls-shadowsocks
cd shadowtls-shadowsocks

# Download compose file
wget -O compose.yaml https://raw.githubusercontent.com/missuo/snell-server-docker/refs/heads/master/compose-shadowsocks.yaml

# Generate random password for enhanced security
openssl rand -base64 32

# Edit the compose file with your configuration
nano compose.yaml

# Start the containers
docker compose up -d

# Check logs
docker compose logs
```

其中我提供的 compose 文件使用的是 ShadowTLS V3 (Strict Mode)。