tunserver

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendTraceInfoToRequestHeader

func AppendTraceInfoToRequestHeader(buf []byte, nodeID string) []byte

func AppendTraceInfoToResponseHeader

func AppendTraceInfoToResponseHeader(buf []byte, nodeID string) []byte

func IsNetErrUseOfCloseNetworkConnection

func IsNetErrUseOfCloseNetworkConnection(err error) bool

func NewTunserver

func NewTunserver(handler http.Handler, scheduler api.Scheduler, nodeID string) http.Handler

NewTunserver creates a tunserver with the given HTTP handler

Types

type CMD

type CMD int

type DataCount

type DataCount struct {
	FromReq int64
	FromTun int64
}

type Req

type Req interface {
	Write(buf []byte) error
	Close() error
}

type TcpReq

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

func (*TcpReq) Close

func (req *TcpReq) Close() error

func (*TcpReq) Write

func (req *TcpReq) Write(buf []byte) error

type TrafficStat

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

type TunManager

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

type Tunnel

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

type TunnelOptions

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

type Tunserver

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

func (*Tunserver) ServeHTTP

func (ts *Tunserver) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP checks if the request path starts with the IPFS path prefix and delegates to the appropriate handler

type WsReq

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

func (*WsReq) Close

func (req *WsReq) Close() error

func (*WsReq) Write

func (req *WsReq) Write(buf []byte) error

Jump to

Keyboard shortcuts

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