niaucchi5

package
v0.22.5 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

README

niaucchi5 --- an obfuscated, encrypted multiplexed unreliable channel

Overview of architecture

Niaucchi5 provides an interface similar to that of QUIC, except that streams are unreliable. There's optional support for reliable streams based on a simple TCP-like protocol.

This maps neatly to Geph: proxy mode uses reliable streams, while VPN mode uses a single unreliable stream.

Niaucchi5 is a richly layered protocol:

|-----------------------|
|        streams        |
|-----------------------|
|  encryption protocol  |
|-----------------------|
| wire | wire | wire ...|
|-----------------------|
| obfs | obfs | obfs ...|
|-----------------------|

We take a bottom-down approach, specifying the lower layers before the upper layers.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StandardAddr net.Addr

StandardAddr is the standard net.Addr to communicate with the "other end" in PacketWire-generated PacketConns.

Functions

func ToPacketConn

func ToPacketConn(pw PacketWire) net.PacketConn

ToPacketConn converts a PacketWire to a PacketConn with a standard remote address.

Types

type PacketWire

type PacketWire interface {
	SendSegment(seg []byte, allowBlocking bool) (err error)
	RecvSegment(seg []byte) (n int, err error)
}

PacketWire is the base "unreliable connection" primitive used in niaucchi5.

type URTCP

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

URTCP implements "unreliable TCP". This is an unreliable PacketWire implementation over reliable net.Conn's like TCP, yet avoids excessive bufferbloat, "TCP over TCP" problems, etc.

func NewURTCP

func NewURTCP(wire net.Conn) *URTCP

NewURTCP creates a new URTCP instance.

func (*URTCP) RecvSegment

func (tr *URTCP) RecvSegment(seg []byte) (n int, err error)

RecvSegment receives a single segment.

func (*URTCP) SendSegment

func (tr *URTCP) SendSegment(seg []byte, block bool) (err error)

SendSegment sends a single segment.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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