faketls

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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