| 服务 | 端口 | 描述 |
|---|---|---|
| supervisor | 9001 | 进程管理界面 |
| mosdns | 53 | DNS 服务入口 |
| mosdns | 7777 | 解析节点域名 |
| mosdns | 8888 | sing-box使用 |
| mosdns | 2222 | 内部的国内dns服务器 |
| mosdns | 3333 | 转发国外请求到内部带过期缓存的服务 |
| mosdns | 4444 | 带过期缓存的内部使用/外部使用的国外dns服务器 |
| mosdns | 5656 | 主分流服务器 |
| http代理 | 7890 | singbox/mihomo 端口 |
| socks5代理 | 7891 | singbox/mihomo 端口 |
| 混合端口 | 7892 | singbox/mihomo 端口 |
| DNS 接口 | 6666 | singbox/mihomo 与 mosdns 对接 |
| TProxy透明代理 | 7896 | nftable 策略使用 |
| redirect代理 | 7877 | nftable 策略使用 |
| Web UI (metacubexd) | 9090 | singbox/mihomo Web 界面 |
🌐 Mosdns 统计界面:http://{IP}:9099/graphic
📦 Supervisor 管理界面:http://{IP}:9001
🕸️ Sing-box/Mihomo 面板 UI:http://{IP}:9090/ui
host模式时,报错的概率大,因为要开放的端口多,注意不要和本地端口冲突。如53 等
docker run -itd --name singbox-mosdns --privileged --restart always --network=host aisyun/singbox-mosdns:latest
services:
sing-box:
image: aisyun/singbox-mosdns:latest
container_name: singbox-mosdns
privileged: true
restart: unless-stopped
network_mode: host
volumes:
#- ./config/sing-box/config.json:/mssb/sing-box/config.json
- "./config:/mssb:rw"
- "./logs:/var/log/supervisor:rw"
cap_add:
- NET_ADMIN
- SYS_PTRACE
- DAC_READ_SEARCH
devices:
- /dev/net/tun
#dns:
# - 119.29.29.29
docker network create --driver macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.253 -o parent=enpxxx macnet
services:
sing-box:
image: aisyun/singbox-mosdns:latest
container_name: singbox-mosdns
privileged: true
restart: unless-stopped
networks:
macnet:
ipv4_address: 192.168.1.200
volumes:
#- ./config/sing-box/config.json:/mssb/sing-box/config.json
- "./config:/mssb:rw"
- "./logs:/var/log/supervisor:rw"
cap_add:
- NET_ADMIN
- SYS_PTRACE
- DAC_READ_SEARCH
devices:
- /dev/net/tun
#dns:
# - 119.29.29.29
networks:
macnet:
external: true
#!/bin/bash
echo "创建一个macvlan桥接网卡: hostvlan"
ip link add hostvlan link enp6s18 type macvlan mode bridge
echo "设置hostvlan IP"
ip addr add 192.168.1.120/32 dev hostvlan
echo "启动hostvlan网卡"
ip link set hostvlan up
echo "添加Singbox 容器 IP 路由到hostvlan"
ip route add 192.168.1.200 dev hostvlan
Content type
Image
Digest
sha256:1a890e981…
Size
52.5 MB
Last updated
about 1 year ago
docker pull aisyun/singbox-mosdns