Replies: 13 comments 16 replies
-
# version: '3'
services:
clash:
container_name: clash-meta
image: metacubex/mihomo:v1.18.4 # 最新版用 metacubex/mihomo:Alpha
restart: always
pid: host
ipc: host
network_mode: host
cap_add:
- ALL
security_opt:
- apparmor=unconfined
volumes:
- ~/clash_meta/clash:/root/.config/mihomo
- /dev/net/tun:/dev/net/tun
# 共享host的时间环境
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
metacubexd:
container_name: metacubexd
image: ghcr.io/metacubex/metacubexd
restart: always
network_mode: bridge
ports:
- '127.0.0.1:28002:80'
volumes:
- ~/clash_meta/caddy:/config/caddy
# 共享host的时间环境
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro |
Beta Was this translation helpful? Give feedback.
-
mixed-port: 7890
allow-lan: true
external-controller: 127.0.0.1:28001
secret: 8a09518e-5d92-4a7e-b811-9dfd3b611842
mode: rule
proxies:
- name: "本地xray"
type: socks5
server: 127.0.0.1
port: 1080
udp: true
# - name: "本地singbox"
# type: socks5
# server: 127.0.0.1
# port: 8848
# udp: true
proxy-groups:
- name: "我的跳板"
type: select
proxies:
- "本地xray"
# - "本地singbox"
- name: "第三方跳板1"
type: select
use:
- "第三方订阅(名字要和 proxy-providers 里的一样)"
- name: "第三方跳板2"
type: url-test # 根据 HTTP 测速延迟自动选择
use:
- "第三方订阅2"
# URL 延迟检测 通用配置
my-url-test: &my-url-test
# 延迟检测 URL
health-check:
enable: true
url: https://cp.cloudflare.com
# 节点连通性检测时间,单位为秒
interval: 300
# 节点超时延迟,单位为毫秒
timeout: 1000
# 节点自动切换差值,单位为毫秒
tolerance: 100
proxy-providers:
"第三方订阅(名字要和 proxy-providers 里的一样)":
type: http
url: "https://你的第三方订阅URL,一般情况长这样,但不一定是这个样子/subscribe?token=2426efe5aaaaa492aaa458aaa4afa83d"
path: /root/.config/mihomo/di3fang.yaml
# 自动更新订阅时间,单位为秒
interval: 3600 # 一小时
# URL 延迟检测逻辑
<<: *my-url-test
"第三方订阅2":
type: http
url: "https://你的第三方订阅URL,一般情况长这样,但不一定是这个样子/subscribe?token=2426efe5acbda492aaa458aaa4afa83d"
path: /root/.config/mihomo/di3fang22222222222222222222222222222.yaml
# 自动更新订阅时间,单位为秒
interval: 3600 # 一小时
# URL 延迟检测逻辑
<<: *my-url-test
dns:
enable: true
ipv6: true
nameserver:
- https://[2606:4700:4700::1111]/dns-query
- 223.5.5.5
fake-ip-filter:
- +.stun.*.*
- +.stun.*.*.*
- +.stun.*.*.*.*
- +.stun.*.*.*.*.*
- "*.n.n.srv.nintendo.net"
- +.stun.playstation.net
- xbox.*.*.microsoft.com
- "*.*.xboxlive.com"
- "*.msftncsi.com"
- "*.msftconnecttest.com"
- WORKGROUP
rules:
#- PROCESS-PATH,/usr/bin/xray,DIRECT
- PROCESS-NAME,ddns-go,DIRECT
- PROCESS-NAME,xray,DIRECT
- PROCESS-NAME,qbittorrent-nox,DIRECT
- MATCH,我的跳板
tun:
enable: false
stack: system
auto-route: true
auto-detect-interface: true
更多配置细节,请查阅官方文档 教程作者我是参考自这个大佬的 配置 才弄懂的 |
Beta Was this translation helpful? Give feedback.
-
nginx 反代
|
Beta Was this translation helpful? Give feedback.
-
假设DDNS域名是 example.com 这个密钥记得自己改!!!用 UUID 生成器随便生成一个!!! 为安全考虑,建议给 Nginx 装上 SSL证书。 Enjoy yourself! :) |
Beta Was this translation helpful? Give feedback.
-
您好!请问 mihomo + metacubexd docker 部署之后,如何使用呢?我在文件服务器上部署了 docker,希望在局域网服务器上通过下面命令使用
请问这个要怎么实现呢? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
补充一下,用这个老哥的config.yaml配置文件 https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
|
Beta Was this translation helpful? Give feedback.
-
我都启动完了,但一直认证失败是咋回事? |
Beta Was this translation helpful? Give feedback.
-
UI和内核怎么不整合在一起 |
Beta Was this translation helpful? Give feedback.
-
按照你们的配置,我只能打开国内网站,国外网站一个打不开!知道什么情况不? |
Beta Was this translation helpful? Give feedback.
-
其实用docker部署ShellCrash就行了,ShellCrash貌似可以用mihomo内核,多内核可选 |
Beta Was this translation helpful? Give feedback.
-
失踪人口诈尸复活来更新了。关于第三方订阅的写法已 更新 一开始没有写订阅的写法是因为教程作者我主要利用 clash 的 TUN 能力,流量跑本地的 xray 的 socks5 然后再翻到我自建的小鸡。 |
Beta Was this translation helpful? Give feedback.
-
先吐槽一番信息的闭塞与混乱。
一开始找 clash内核 的代替品,找到 "clash meta"/"singbox" 这两个内核。
clash meta 不知道为什么改名成了 mihomo (避嫌?),我很长一段时间不知道它们竟然是同一个东西!
(就像 USB 3.0 一改 3.1 再改 3.2 造成信息极度混乱的感觉……)
然后找容器化部署方案。mihomo 没有把 docker 部署方案写到 readme 里,网上也找不到教程。
却十分万幸地在这个仓库找到了镜像tag以及 docker compose 的写法。
碎碎念废话结束,开始正篇!Beta Was this translation helpful? Give feedback.
All reactions