registry

package
v0.0.4-beta1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpProps

type HttpProps struct {
	Host string
}

type HttpsTunnel

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

func (*HttpsTunnel) GetSession

func (t *HttpsTunnel) GetSession() *yamux.Session

func (*HttpsTunnel) Match

func (t *HttpsTunnel) Match(req http.Header) bool

type Protocol

type Protocol string
const (
	HttpProtocol Protocol = "http"
	TlsProtocol  Protocol = "tls"
)

type Session

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

type TlsProps

type TlsProps struct {
	Sni string
}

type TlsTunnel

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

func (*TlsTunnel) GetSession

func (t *TlsTunnel) GetSession() *yamux.Session

func (*TlsTunnel) Match

func (t *TlsTunnel) Match(clientHello *tls.ClientHelloInfo) bool

type Tunnel

type Tunnel interface {
	GetSession() *yamux.Session
	Match(req *http.Request, clientHello *tls.ClientHelloInfo) bool
}

type TunnelCtx

type TunnelCtx struct {
	DestConn        net.Conn
	Reader          *bufio.Reader
	Conn            net.Conn
	ClientHelloInfo *tls.ClientHelloInfo
}

type TunnelRegistry

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

func NewTunnelRegistry

func NewTunnelRegistry(db *gorm.DB) *TunnelRegistry

func (*TunnelRegistry) GetHttpSession

func (r *TunnelRegistry) GetHttpSession(req http.Header) (*yamux.Session, *db.Tunnel, error)

func (*TunnelRegistry) GetHttpTunnels

func (r *TunnelRegistry) GetHttpTunnels() (map[string]*HttpsTunnel, error)

func (*TunnelRegistry) GetTLSSession

func (r *TunnelRegistry) GetTLSSession(clientHello *tls.ClientHelloInfo) (*yamux.Session, *db.Tunnel, error)

func (*TunnelRegistry) GetTLSTunnels

func (r *TunnelRegistry) GetTLSTunnels() (map[string]*TlsTunnel, error)

func (*TunnelRegistry) RemoveSession

func (r *TunnelRegistry) RemoveSession(tunn *db.Tunnel) error

func (*TunnelRegistry) StoreSession

func (r *TunnelRegistry) StoreSession(
	sess *yamux.Session,
) (*db.Tunnel, error)

Jump to

Keyboard shortcuts

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