32 lines
976 B
YAML
32 lines
976 B
YAML
services:
|
|
proxy:
|
|
image: metacubex/mihomo
|
|
container_name: proxy
|
|
restart: always
|
|
# 只绑定本地回环地址
|
|
ports:
|
|
- "0.0.0.0:7890:7890" # mixed-port (HTTP/SOCKS)
|
|
- "7891:7891" # SOCKS5 代理
|
|
- "127.0.0.1:9090:9090" # API 控制口
|
|
volumes:
|
|
- ./config:/root/.config/mihomo
|
|
environment:
|
|
- GEOIP_URL=https://ghproxy.dockless.eu.org//https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb
|
|
- GEOSITE_URL=https://ghproxy.dockless.eu.org/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat
|
|
- SUBSCRIPTION_URL=https://app.mitce.net/?sid=303534&token=srveqevu
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"netstat -tln | grep -q ':7890'"
|
|
]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
networks:
|
|
- proxy_net
|
|
|
|
networks:
|
|
proxy_net:
|
|
external: true |