faketls

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 9 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, 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
)

Directories

Path Synopsis
Package tlstypes is copy of tlstypes package in mtg.
Package tlstypes is copy of tlstypes package in mtg.

Jump to

Keyboard shortcuts

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