mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-05 07:50:24 +08:00
feat(p2p): ip support configs
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user