📒 代理与虚拟专用网¶
代理¶
VPN¶
WireGuard¶
- 
基本原理:
- 无连接
 - 
握手过程:
sequenceDiagram participant A as initiator participant B as responder A->>B: handshake initiation B->>A: handshake response Note over A,B: keys calculated A<<->>B: secure data exchange - 
发包过程:
- 根据 IP 地址寻找 Peer,否则丢弃。
 - 加密。
 - 寻找 Peer 的 Remote Endpoint。
 - 发包。
 
 - 收包过程:
- 解密。
 - 认证 Peer 信息,成功则更新 Peer Endpoint。
 - 检查 Peer 是否被允许以对应的 IP 地址发送数据。
 - 收包。
 
 
 - 
配置:
Warning
wg命令和wg-quick命令的配置文件格式不同。下面为wg-quick的配置文件。 - 
调测: