forked from jasonwong1991/easy_proxies
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (44 loc) · 2.11 KB
/
Copy pathdocker-compose.yml
File metadata and controls
44 lines (44 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
services:
easy_proxies:
image: ghcr.io/jasonwong1991/easy_proxies:latest
container_name: easy_proxies
restart: unless-stopped
# 方式一:使用主机网络模式(推荐,支持端口自动重分配)
network_mode: host
user: "${UID:-10001}:${GID:-10001}"
# 方式二:手动映射端口(注释掉 network_mode,启用下面的 ports)
# ports:
# # Pool 模式入口(pool/hybrid 模式使用)
# - "2323:2323"
# # Web 监控面板
# - "9091:9091"
# # Multi-port 端口范围(multi-port/hybrid 模式使用,根据节点数量调整)
# - "24000-24200:24000-24200"
#
# 支持的运行模式(在 config.yaml 中配置):
# - pool: 单端口代理池,所有节点共享 2323 端口
# - multi-port: 多端口模式,每个节点独立端口
# - hybrid: 混合模式,同时启用 pool (2323) + multi-port (24000+)
#
# hybrid 模式说明:
# - 代理池入口:http://0.0.0.0:2323 / socks5://0.0.0.0:2323(自动负载均衡)
# - 独立节点入口:http://0.0.0.0:24000, ... 或 socks5://0.0.0.0:24000, ...(直连特定节点)
# - 节点状态在两种入口间共享(黑名单同步)
# - 端口冲突时自动重分配到下一个可用端口
#
# 使用示例:
#
# 方式一:映射配置目录(推荐,零配置启动)
# docker run --user $(id -u):$(id -g) -v ./data:/etc/easy_proxies ghcr.io/jasonwong1991/easy_proxies:latest
#
# 方式二:映射配置文件(传统方式)
# docker run -v ./config.yaml:/etc/easy_proxies/config.yaml -v ./nodes.txt:/etc/easy_proxies/nodes.txt ghcr.io/jasonwong1991/easy_proxies:latest
#
volumes:
# 方式一:映射配置目录(首次启动自动生成 config.yaml 和 nodes.txt)
- ./data:/etc/easy_proxies
# 方式二:映射配置文件(需要预先创建)
# - ./config.yaml:/etc/easy_proxies/config.yaml
# - ./nodes.txt:/etc/easy_proxies/nodes.txt
# 日志映射目录(当从 WebUI 开启日志写到文件时有效)
- ./logs:/app/logs