Skip to content

Commit

Permalink
feat(p2p): ip support configs
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Jul 17, 2024
1 parent 28c388a commit 5ff8d27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gold/p2p/ip/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 5ff8d27

Please sign in to comment.