VXVX Docs

WireGuard

DeviceConfig 与 PeerConfig

Proto:protos/proto/vx/proxy/wireguard/config.proto

WireGuard 仅作为出站 DeviceConfig 使用(此 proto 无 *ServerConfig)。

DeviceConfig

secretKey
string

本地接口私钥(WireGuard 密钥格式)

endpoint
string[]

设备级端点主机列表(可选)

peers

远端对等体,见 PeerConfig

mtu
int32

TUN 接口 MTU

numWorkers
int32

加密工作线程数

reserved
bytes

WireGuard 协议保留字节(3 字节,用于绕过封锁)

noKernelTun
bool

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

publicKey
string

对等体公钥

preSharedKey
string

可选预共享密钥(PSK)

endpoint
string

对等体端点 host:port

keepAlive
uint32

持久 keepalive 间隔(

allowedIps
string[]

经本对等体路由的 IP CIDR 列表

相关

评论