Claw Mesh

CLAW Mesh - WireGuard 全网状 VPN + AI 集群调度器

2233admin
開発者 2233admin
その他 · TypeScript · 更新日: 5 months ago
3
スター
1
Forks
コミュニティ
BB
安全性:
優秀
A
品質:

name: wireguard-mesh description: WireGuard 全网状 VPN + AI 集群调度器。用于多节点 WireGuard 组网、内网穿透、渲染农场式 DAG 任务调度。触发词:WireGuard、VPN 组网、全网状、mesh networking、节点互通、内网穿透、集群调度、异步推理、并行任务

WireGuard Mesh Skill

多节点 WireGuard 全网状 VPN + AI 集群调度器。

Capabilities

Network Topology

混合拓扑(Hybrid Mesh):

适用场景

拓扑 适用场景 优点 缺点
全网状(默认) 节点少(<10)、低延迟要求 无中心瓶颈、直连快 隧道数 O(n²)、维护开销大
混合拓扑 节点多(>10)、跨区域 隧道数 O(n)、维护开销小 依赖 Hub、跨区域需中转

Default Parameters

How to Use

1. 安装

# RHEL/OpenCloudOS/CentOS
yum install -y wireguard-tools || dnf install -y wireguard-tools
# Debian/Ubuntu
apt install -y wireguard
# 加载内核模块
modprobe wireguard

2. 生成密钥

wg genkey | tee /etc/wireguard/private.key | wg pubkey &gt; /etc/wireguard/public.key
chmod 600 /etc/wireguard/private.key

3. 配置文件模板 /etc/wireguard/wg0.conf

[Interface]
PrivateKey = &lt;本机私钥&gt;
Address = 10.10.0.X/24
ListenPort = 51820

# 对每个 peer 重复以下段
[Peer]
PublicKey = &lt;对端公钥&gt;
AllowedIPs = 10.10.0.Y/32
Endpoint = &lt;对端公网IP&gt;:51820
PersistentKeepalive = 25

4. 启动 & 开机自启

systemctl enable wg-quick@wg0
systemctl start wg-quick@wg0

5. 验证

wg show wg0          # 查看接口状态
ping 10.10.0.Y       # 测试连通性

IP Allocation Rules

按节点角色顺序分配:

Firewall Requirements

云服务商安全组需放开 UDP 51820(所有节点互通)。

Coexistence with SSH Tunnels

WireGuard 作为主通道,SSH 隧道保留为备用:

Troubleshooting

# 检查接口是否启动
ip a show wg0
# 检查握手状态(latest handshake 应 &lt; 2 分钟)
wg show wg0
# 检查 UDP 端口
netstat -ulnp | grep 51820
# 重启接口
systemctl restart wg-quick@wg0

Expanding New Nodes

  1. 新节点安装 WireGuard + 生成密钥
  2. 分配下一个 IP(如 10.10.0.4)
  3. 新节点配置所有现有节点为 Peer
  4. 所有现有节点追加新 Peer 段并 wg syncconf wg0 &lt;(wg-quick strip wg0) 热加载
  5. 安全组放开新节点 ↔ 所有节点的 UDP 51820

Notes

Reference

Limitations

🔓 サインインしてさらに解放
GitHub でサインイン