WireGuard
DeviceConfig 与 PeerConfig
Proto:protos/proto/vx/proxy/wireguard/config.proto
WireGuard 仅作为出站 DeviceConfig 使用(此 proto 无 *ServerConfig)。
DeviceConfig
secretKeystring
本地接口私钥(WireGuard 密钥格式)
endpointstring[]
设备级端点主机列表(可选)
mtuint32
TUN 接口 MTU
numWorkersint32
加密工作线程数
reservedbytes
WireGuard 协议保留字节(3 字节,用于绕过封锁)
noKernelTunbool
true 时仅使用用户空间 TUN,不使用内核 WireGuard
{
"@type": "type.googleapis.com/vx.proxy.wireguard.DeviceConfig",
"secretKey": "...",
"isClient": true,
"peers": [
{
"publicKey": "...",
"endpoint": "vpn.example.com:51820",
"allowedIps": ["0.0.0.0/0", "::/0"]
}
]
}PeerConfig
publicKeystring
对等体公钥
preSharedKeystring
可选预共享密钥(PSK)
endpointstring
对等体端点 host:port
keepAliveuint32
持久 keepalive 间隔(秒)
allowedIpsstring[]
经本对等体路由的 IP CIDR 列表