Files
chuan fbf8ecd799
Docker Build / docker-build (push) Successful in 14s
docs: update core
2026-05-27 14:25:03 +08:00

3.2 KiB
Raw Permalink Blame History

核心配置

对应 settings.toml[core]

设置 UI 默认值 可选值 作用 什么时候修改
log_level 显示 info debug / info / warning / error / none 写入 Xray log.logleveldebug 便于排查,none 基本关闭日志。 排查启动失败、路由/DNS 行为异常时改 debug;日常用 info
mux_enabled 间接显示 false bool 控制主 proxy outbound 是否生成 mux。UI 通过 mux_concurrency = 0 表示关闭。 节点支持且希望复用连接时开启;兼容性异常时关闭。
mux_concurrency 显示 8 UI0/1/2/4/8/16/32/64;模型:1-1024 mux.concurrency。UI 选择 0 时保存为 mux_enabled = false 且并发恢复为 8 高并发小连接场景可尝试 8/16;不确定用 0
tcp_fast_open 隐藏 default default / yes / no default 时写入 outbound streamSettings.sockopt.tcpFastOpen 只有明确知道系统和网络支持 TFO 时修改。
transparent.output_bypass_rules 显示 "" 每行一条 tcp/udp/all 目标[:端口] 在 transparent 系统规则的本机 OUTPUT 链前置 RETURN,避免宿主机进程被透明代理截获。 easytier、其它 host network 服务需要直连固定 peer 时修改。
ss_backend 隐藏 "" 字符串 预留字段,当前不影响 Xray JSON。 当前不用改。
trojan_backend 隐藏 "" 字符串 预留字段,当前不影响 Xray JSON。 当前不用改。

transparent

核心卡片里的 transparent 输入框对应 [transparent].output_bypass_rules

格式:

tcp 117.72.47.28:33010
all 192.168.0.0/24
udp 198.51.100.10:3478

规则含义:

写法 作用
tcp 117.72.47.28:33010 本机 TCP 访问该 IP 和端口时直连,不进入 transparent。
all 192.168.0.0/24 本机访问该网段时直连;redirect 下只生成 TCPtproxy 下生成 TCP 和 UDP。
udp 198.51.100.10:3478 tproxy 下本机 UDP 访问该 IP 和端口时直连;redirect 下忽略 UDP。

典型场景:

tcp 117.72.47.28:33010

用于避免 easytier 这类 network_mode: host 服务的 peer 连接被 nat OUTPUT -> TP_OUT -> REDIRECT 截获。

生成顺序:

iptables -t nat -A TP_OUT -p tcp -d 117.72.47.28 --dport 33010 -j RETURN
iptables -t nat -A TP_OUT -j TP_RULE

该设置只影响宿主机本机 OUTPUT 流量,不影响 Docker 容器透明代理的 PREROUTING 流量。

生成影响

条件 生成结果
log_level = debug log.loglevel = debugaccess = ""error = ""
log_level = warning log.loglevel = warningaccess = "none"
log_level = none log.loglevel = noneaccess = "none"error = "none"
mux_enabled = true 主代理 outbound 增加 mux.enabled = truemux.concurrency
tcp_fast_open != default proxy / direct outbound 增加 sockopt.tcpFastOpen
transparent.output_bypass_rules 非空 TP_OUT 跳转 TP_RULE 前生成 OUTPUT 绕过 RETURN 规则。