mirror of
https://github.com/whyvl/wireproxy.git
synced 2025-04-29 10:51:42 +02:00
16 lines
266 B
Go
16 lines
266 B
Go
// will delete when upgrading to go 1.18
|
|
|
|
package wireproxy
|
|
|
|
import (
|
|
"net"
|
|
"net/netip"
|
|
)
|
|
|
|
func TCPAddrFromAddrPort(addr netip.AddrPort) *net.TCPAddr {
|
|
return &net.TCPAddr{
|
|
IP: addr.Addr().AsSlice(),
|
|
Zone: addr.Addr().Zone(),
|
|
Port: int(addr.Port()),
|
|
}
|
|
}
|