SpoofDPI/net/tcp.go

21 lines
224 B
Go
Raw Normal View History

2022-05-13 09:49:05 +00:00
package net
import (
"net"
)
type TCPAddr struct {
2022-11-29 07:54:28 +00:00
Addr *net.TCPAddr
2022-05-13 09:49:05 +00:00
}
2022-11-29 07:54:28 +00:00
func TcpAddr(ip string, port int) *TCPAddr {
addr := &net.TCPAddr{
IP: net.ParseIP(ip),
Port: port,
}
2022-05-13 09:49:05 +00:00
2022-11-29 07:54:28 +00:00
return &TCPAddr{
Addr: addr,
}
2022-05-13 09:49:05 +00:00
}