faketls

package
v0.102.0-my2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package faketls contains faketls implementation.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version10Bytes = [2]byte{0x03, 0x01}
	Version11Bytes = [2]byte{0x03, 0x02}
	Version12Bytes = [2]byte{0x03, 0x03}
	Version13Bytes = [2]byte{0x03, 0x04}
)

Possible versions.

Functions

This section is empty.

Types

type FakeTLS

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

FakeTLS implements FakeTLS obfuscation protocol.

func NewFakeTLS

func NewFakeTLS(r io.Reader, conn io.ReadWriter) *FakeTLS

NewFakeTLS creates new FakeTLS.

func (*FakeTLS) Handshake

func (o *FakeTLS) Handshake(protocol [4]byte, dc int, s mtproxy.Secret) error

Handshake performs FakeTLS handshake.

func (*FakeTLS) Read

func (o *FakeTLS) Read(b []byte) (n int, err error)

Read implements io.Reader.

func (*FakeTLS) Write

func (o *FakeTLS) Write(b []byte) (n int, err error)

Write implements io.Writer.

type HandshakeType

type HandshakeType uint8

HandshakeType represents TLS handshake record type byte.

const (
	// HandshakeTypeClient is client handshake message type.
	HandshakeTypeClient HandshakeType = 0x01
	// HandshakeTypeServer is server handshake message type.
	HandshakeTypeServer HandshakeType = 0x02
)

type RecordType

type RecordType uint8

RecordType represents TLS record type byte.

const (
	// RecordTypeChangeCipherSpec is ChangeCipherSpec record type byte.
	RecordTypeChangeCipherSpec RecordType = 0x14
	// RecordTypeAlert is Alert record type byte.
	RecordTypeAlert RecordType = 0x15
	// RecordTypeHandshake is Handshake record type byte.
	RecordTypeHandshake RecordType = 0x16
	// RecordTypeApplication is Application record type byte.
	RecordTypeApplication RecordType = 0x17
	// RecordTypeHeartbeat is Heartbeat record type byte.
	RecordTypeHeartbeat RecordType = 0x18
)

Jump to

Keyboard shortcuts

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