utls

package
v5.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2023 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ForcedALPN_name = map[int32]string{
		0: "TRANSPORT_PREFERENCE_TAKE_PRIORITY",
		1: "NO_ALPN",
		2: "UTLS_PRESET",
	}
	ForcedALPN_value = map[string]int32{
		"TRANSPORT_PREFERENCE_TAKE_PRIORITY": 0,
		"NO_ALPN":                            1,
		"UTLS_PRESET":                        2,
	}
)

Enum value maps for ForcedALPN.

View Source
var File_transport_internet_tls_utls_config_proto protoreflect.FileDescriptor

Functions

func NewUTLSSecurityEngineFromConfig

func NewUTLSSecurityEngineFromConfig(config *Config) (security.Engine, error)

Types

type Config

type Config struct {
	TlsConfig *tls.Config `protobuf:"bytes,1,opt,name=tls_config,json=tlsConfig,proto3" json:"tls_config,omitempty"`
	Imitate   string      `protobuf:"bytes,2,opt,name=imitate,proto3" json:"imitate,omitempty"`
	NoSNI     bool        `protobuf:"varint,3,opt,name=noSNI,proto3" json:"noSNI,omitempty"`
	ForceAlpn ForcedALPN  `` /* 144-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetForceAlpn added in v5.3.0

func (x *Config) GetForceAlpn() ForcedALPN

func (*Config) GetImitate

func (x *Config) GetImitate() string

func (*Config) GetNoSNI

func (x *Config) GetNoSNI() bool

func (*Config) GetTlsConfig

func (x *Config) GetTlsConfig() *tls.Config

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func (Engine) Client

func (e Engine) Client(conn net.Conn, opts ...security.Option) (security.Conn, error)

type ForcedALPN added in v5.3.0

type ForcedALPN int32
const (
	ForcedALPN_TRANSPORT_PREFERENCE_TAKE_PRIORITY ForcedALPN = 0
	ForcedALPN_NO_ALPN                            ForcedALPN = 1
	ForcedALPN_UTLS_PRESET                        ForcedALPN = 2
)

func (ForcedALPN) Descriptor added in v5.3.0

func (ForcedALPN) Descriptor() protoreflect.EnumDescriptor

func (ForcedALPN) Enum added in v5.3.0

func (x ForcedALPN) Enum() *ForcedALPN

func (ForcedALPN) EnumDescriptor deprecated added in v5.3.0

func (ForcedALPN) EnumDescriptor() ([]byte, []int)

Deprecated: Use ForcedALPN.Descriptor instead.

func (ForcedALPN) Number added in v5.3.0

func (x ForcedALPN) Number() protoreflect.EnumNumber

func (ForcedALPN) String added in v5.3.0

func (x ForcedALPN) String() string

func (ForcedALPN) Type added in v5.3.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL