1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-01 19:45:24 +00:00
v2fly/transport/internet/security/security.go

34 lines
524 B
Go

package security
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
import (
"github.com/v2fly/v2ray-core/v5/common/net"
)
type Engine interface {
Client(conn net.Conn, opts ...Option) (Conn, error)
}
type Conn interface {
net.Conn
}
type Option interface {
isSecurityOption()
}
type OptionWithALPN struct {
ALPNs []string
}
func (a OptionWithALPN) isSecurityOption() {
}
type OptionWithDestination struct {
Dest net.Destination
}
func (a OptionWithDestination) isSecurityOption() {
}