Files
Meshray-Manager/cmd/mr-wg/meshray-core.toml.sample
T
zkcoi 59e3059246 rebuild: split core into separate repo; move wg-go integration to internal/ctr/corebind
- go.mod: require git.zkcoi.com/zkcoi/meshray/core, replace => ../Meshray
- internal/ctr/corebind: EnhancedBind + registry + adapter (wg-go integration isolated)
- cmd/mr-wg migrated from old core/cmd/meshray-core
- core/ removed; CHANGELOG updated; fix checkdb vet warning
2026-07-15 16:08:13 +08:00

55 lines
1.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# meshray-core 独立运行配置(类 frp 风格,TOML)
# 用法: meshray-core -c meshray-core.toml
# 也兼容旧 JSON 配置(扩展名 .json 自动按 JSON 解析)。
# 网络标识,同网段节点需一致
network_id = "net1"
# 本地监听端口(WireGuard / 增强模式收发端口)
listen_port = 51820
# 隧道 MTU0 则默认 1420
mtu = 1420
# 私钥:留空则自动生成并写入 private_key_file
private_key = ""
private_key_file = "key.txt"
# 本机隧道 IPCIDR
interface = "10.0.0.1/24"
# 运行模式:
# enhanced = 经 9 层传输接管 WG 收发(支持自动降级 / 手动层级)
# native = 裸 WireGuard UDP 直连(不经本仓传输层)
mode = "enhanced"
# 传输层级策略:
# auto = 默认,9 层自动降级(直连 → 中继 → ... → WS/WSS
# manual = 仅使用下方 layers 指定的层
layer_strategy = "auto"
# 手动层级列表(仅 layer_strategy = "manual" 生效)。
# 单元素 = 强制固定该层,禁用降级,例如强制走 TURN 中继:["TURN-TCP"]
# 多元素 = 按列表顺序自定义降级链,例如直连优先、不通再中继:["Direct-UDP","TURN-TCP"]
# 可选值:Direct-UDP / FakeTCP / RealTCP / TURN-UDP / TURN-QUIC / TURN-TCP /
# TURN-TLS / WebRTC / WS(或 WSS)
# 注意:该键须置于 [[peers]] 之前(TOML 中 [[peers]] 后键会被归入 peers 表)。
layers = ["Direct-UDP"]
# 对端列表
[[peers]]
public_key = "对端公钥base64" # 必填
endpoint = "203.0.113.2:51820" # 增强模式经 9 层拨号对端;留空则仅作为接收方
allowed_ips = ["10.0.0.2/32"]
# 可选第二个对端
# [[peers]]
# public_key = "另一个对端公钥base64"
# endpoint = "198.51.100.7:51820"
# allowed_ips = ["10.0.0.3/32"]
# STUN/TURN 服务器(增强模式打洞/中继用;手动 TURN/WebRTC 层级必需)
[ice]
stun = ["stun:stun.l.google.com:19302"]
turn = ["turn:your.turn.server:3478"]