forwarder

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package forwarder is the MITM that operates the communication without descryption.

Index

Constants

View Source
const (
	TLSHandshake    byte = 0x16
	TLSChangeCipher byte = 0x14
	TLSApplication  byte = 0x17
)

TLS packet types.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forwarder

type Forwarder struct {
	LeftAddr  net.Addr
	LeftConn  *bufconn.Conn
	LeftTran  Transformer
	RightAddr net.Addr
	RightConn *bufconn.Conn // TCP/UDP
	RightTran Transformer
	Timeout   time.Duration
	Wave      float64
}

Forwarder is the relay for client to upstream and proxy to downstream.

func (*Forwarder) Tunnel

func (fw *Forwarder) Tunnel() (bool, error)

Tunnel operates the communication.

type Transformer added in v0.1.8

type Transformer interface {
	Transform([]byte) []byte
}

Transformer offers methods on the data.

Jump to

Keyboard shortcuts

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