utls

package
v5.0.0-...-470bbe4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 13 Imported by: 0

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

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

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

func (ForcedALPN) Descriptor

func (ForcedALPN) Descriptor() protoreflect.EnumDescriptor

func (ForcedALPN) Enum

func (x ForcedALPN) Enum() *ForcedALPN

func (ForcedALPN) EnumDescriptor deprecated

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

Deprecated: Use ForcedALPN.Descriptor instead.

func (ForcedALPN) Number

func (x ForcedALPN) Number() protoreflect.EnumNumber

func (ForcedALPN) String

func (x ForcedALPN) String() string

func (ForcedALPN) Type

Jump to

Keyboard shortcuts

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