sing/common/metadata/metadata.go
2022-04-11 12:46:23 +08:00

20 lines
331 B
Go

package metadata
import (
"net"
"github.com/sagernet/sing/common/buf"
)
type Metadata struct {
Source *AddrPort
Destination *AddrPort
}
type TCPConnectionHandler interface {
NewConnection(conn net.Conn, metadata Metadata) error
}
type UDPHandler interface {
NewPacket(packet *buf.Buffer, metadata Metadata) error
}