quic

package module
v0.0.0-...-af1ce48 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UseRawStream = true

Functions

This section is empty.

Types

type DataStreamer

type DataStreamer interface {
	DataStream() quic.Stream
}

DataSreamer is implemented by response writer on server side to take over the stream.

type Quic

type Quic struct {
	Auth *auth.Auth
	Port int

	// Incoming streams are mapped to HTTP
	HTTPHandler http.Handler

	// UgateSVC - for node tracking
	UG *ugatesvc.UGate
	// contains filtered or unexported fields
}

Quic is the adapter to QUIC/H3/MASQUE for uGate.

Implements: - MuxDialer

Will start a H3 server and dispatch streams and H3 requests to uGate

Integration with Quic library: - fork to expose few internal methods needed - low level UDP will be multiplexed with STUN/TURN - feature is supported upstream - using the raw QUIC library for streams, to get access to the reverse path - main RoundTripper is uGate, this acts as 'client.go'.

TODO: Datagram will also be dispatched - either as UDP or as Webpush messages TODO: define 'webpush over MASQUE' TODO: also MASQUE-IP, if TUN support is enabled ( Android )

func New

func New(ug *ugatesvc.UGate) *Quic

func (*Quic) DialMux

func (qd *Quic) DialMux(ctx context.Context, node *ugate.DMNode, meta http.Header, ev func(t string, stream *ugate.Stream)) (ugate.Muxer, error)

func (*Quic) Start

func (qd *Quic) Start() error

type QuicMUX

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

QuicMUX is a mux to a specific node. May be accepted or dialed. Equivalent with quic/h3/client.go ( when dialing ), and Quic server when accepting.

func (*QuicMUX) Close

func (ugs *QuicMUX) Close() error

func (*QuicMUX) DialStream

func (ugs *QuicMUX) DialStream(ctx context.Context, addr string, inStream *ugate.Stream) (*ugate.Stream, error)

func (*QuicMUX) RoundTrip

func (ugs *QuicMUX) RoundTrip(request *http.Request) (*http.Response, error)

RoundTrip is used for forwarding HTTP connections back to the client (normal) or server ( reverse ).

Jump to

Keyboard shortcuts

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