sing-box/adapter/v2ray.go
2024-11-23 13:29:23 +08:00

25 lines
430 B
Go

package adapter
import (
"context"
"net"
N "github.com/sagernet/sing/common/network"
)
type V2RayServerTransport interface {
Network() []string
Serve(listener net.Listener) error
ServePacket(listener net.PacketConn) error
Close() error
}
type V2RayServerTransportHandler interface {
N.TCPConnectionHandlerEx
}
type V2RayClientTransport interface {
DialContext(ctx context.Context) (net.Conn, error)
Close() error
}