From 5ff8d27fe4055e0dbcaa63031d0306329e17f25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Thu, 18 Jul 2024 02:04:34 +0900 Subject: [PATCH] feat(p2p): ip support configs --- gold/p2p/ip/init.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gold/p2p/ip/init.go b/gold/p2p/ip/init.go index e984e39..153e904 100644 --- a/gold/p2p/ip/init.go +++ b/gold/p2p/ip/init.go @@ -14,6 +14,9 @@ func NewEndpoint(endpoint string, configs ...any) (p2p.EndPoint, error) { return nil, err } ptcl := uint(0x04) // IPIP + if len(configs) > 0 { + ptcl = configs[0].(uint) + } return &EndPoint{ addr: &net.IPAddr{ IP: addr.AsSlice(),