1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-07-01 08:10:22 +08:00

feat: split udp protocol to folder p2p

This commit is contained in:
源文雨
2024-07-14 22:26:44 +09:00
parent 4a8e848673
commit 32af3ce142
16 changed files with 180 additions and 49 deletions

View File

@@ -7,6 +7,7 @@ import (
"sync/atomic"
"github.com/fumiama/WireGold/gold/head"
"github.com/fumiama/WireGold/gold/p2p"
"github.com/fumiama/WireGold/helper"
base14 "github.com/fumiama/go-base16384"
)
@@ -24,7 +25,7 @@ type Link struct {
// peer 的虚拟 ip
peerip net.IP
// peer 的公网 endpoint
endpoint *net.UDPAddr
endpoint p2p.EndPoint
// 本机允许接收/发送的 ip 网段
allowedips []*net.IPNet
// 连接所用对称加密密钥集