🚀 基于最新 Mihomo 内核,内置 Dashboard 的 Clash Docker 镜像
Github - 欢迎Star🌟与Issue
| 协议 | 说明 |
|---|---|
| Shadowsocks (SS) | 经典轻量级加密代理 |
| VMess | V2Ray 原生协议 |
| VLESS | V2Ray 轻量协议,性能更优 |
| Trojan | 基于 TLS 的隐蔽协议 |
| Hysteria | 基于 QUIC 的高速协议 |
| Hysteria2 | Hysteria 第二代,更快更稳 |
| TUIC | 基于 QUIC 的多路复用协议 |
| WireGuard | 现代化 VPN 协议 |
| HTTP | HTTP/HTTPS 代理 |
| SOCKS5 | 通用 SOCKS5 代理 |
glash 支持两种使用模式:订阅模式(推荐)和本地配置模式。
自动从订阅链接下载配置,支持定时更新,无需手动维护配置文件。
docker run -d \
--name glash \
--restart unless-stopped \
-p 7890:7890 \
-p 7891:7891 \
-p 9090:9090 \
-v /path/to/config:/root/.config/mihomo \
-e SUB_URL=https://your-subscription-url.com/config \
-e SUB_CRON="0 */6 * * *" \
-e SECRET=your-dashboard-password \
gangz1o/glash:latest
services:
glash:
image: gangz1o/glash:latest
container_name: glash
restart: unless-stopped
ports:
- '7890:7890' # HTTP 代理
- '7891:7891' # SOCKS5 代理
- '9090:9090' # Dashboard
volumes:
- ./config:/root/.config/mihomo
environment:
- TZ=Asia/Shanghai
- SUB_URL=https://your-subscription-url.com/config
- SUB_CRON=0 */6 * * *
- SECRET=your-dashboard-password
使用本地 config.yaml 配置文件,适合手动管理配置的用户。
docker run -d \
--name glash \
--restart unless-stopped \
-p 7890:7890 \
-p 7891:7891 \
-p 9090:9090 \
-v /path/to/config.yaml:/root/.config/mihomo/config.yaml:ro \
gangz1o/glash:latest
services:
glash:
image: gangz1o/glash:latest
container_name: glash
restart: unless-stopped
ports:
- '7890:7890' # HTTP 代理
- '7891:7891' # SOCKS5 代理
- '9090:9090' # Dashboard
volumes:
- ./config.yaml:/root/.config/mihomo/config.yaml:ro
environment:
- TZ=Asia/Shanghai
默认自动匹配当前平台,如需指定架构:
# x86_64 / amd64
docker pull --platform linux/amd64 gangz1o/glash:latest
# ARM64 (Apple Silicon / ARM 服务器)
docker pull --platform linux/arm64 gangz1o/glash:latest
⚠️ 重要提示:使用订阅功能时,配置目录必须可写,不能使用
:ro(只读)模式挂载!
| 变量 | 说明 | 示例 |
|---|---|---|
SUB_URL | 订阅地址,支持返回 Clash 配置的链接 | https://example.com/sub |
SUB_CRON | 自动更新的 cron 表达式 | 0 */6 * * * |
SECRET | Dashboard 登录密钥,会自动注入配置 | my-password |
DOWNLOAD_PROXY | 首次下载订阅时使用的外部代理(可选) | http://192.168.1.1:7890 |
启动时(本地有配置):
启动时(本地无配置):
DOWNLOAD_PROXY,使用外部代理下载定时更新:
SUB_CRON,按照 cron 表达式定时更新SECRET 注入:
SECRET,会自动写入配置文件的 secret 字段提示:如果订阅地址需要代理访问且本地没有配置文件,请设置
DOWNLOAD_PROXY指向一个可用的代理。
| 表达式 | 说明 |
|---|---|
0 */6 * * * | 每 6 小时更新 |
0 0 * * * | 每天凌晨更新 |
0 */12 * * * | 每 12 小时更新 |
*/30 * * * * | 每 30 分钟更新 |
0 8 * * * | 每天早上 8 点更新 |
docker exec glash cat /var/log/subscription.log
你的 config.yaml 必须包含以下配置才能正常使用 Dashboard:
# 允许外部访问 API
external-controller: 0.0.0.0:9090
或者是
external-controller::9090
# 密钥(用于登录dashboard ,可不填,建议填上,提高安全性)
secret: ''
| 端口 | 用途 |
|---|---|
| 7890 | HTTP 代理 |
| 7891 | SOCKS5 代理 |
| 7892 | 混合代理 (HTTP + SOCKS5) |
| 9090 | RESTful API & Dashboard |
启动后访问:http://127.0.0.1:9090/ui/

首次访问需要配置:
http://127.0.0.1:9090secret 一致port: 7890
socks-port: 7891
allow-lan: true
mode: rule
log-level: info
# Dashboard 必需配置
external-controller: 0.0.0.0:9090
proxies:
- name: '节点名称'
type: vmess
server: example.com
port: 443
uuid: your-uuid
# ... 其他配置
proxy-groups:
- name: '🚀 节点选择'
type: select
proxies:
- 节点名称
rules:
- GEOIP,CN,DIRECT
- MATCH,🚀 节点选择

https://docker.1ms.run
https://docker.kejilion.pro
https://docker-registry.nmqu.com
https://docker.xuanyuan.me
https://dockerproxy.net
https://hub.rat.dev
https://hub1.nat.tf
https://hub2.nat.tf
https://hub3.nat.tf
https://hub4.nat.tf
https://mirror.iscas.ac.cn
https://docker.hpcloud.cloud
https://docker.apiba.cn
Content type
Image
Digest
sha256:22993be4f…
Size
36.6 MB
Last updated
26 days ago
docker pull gangz1o/glash