proxy

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PORT = struct {
	Start int
	Size  int
	Curr  int
}{
	Start: 9000,
	Size:  1000,
	Curr:  9000,
}

Functions

This section is empty.

Types

type Local

type Local struct {
	Address  string
	Tgt      schema.Target
	Listen   string
	Listener net.Listener
	Client   *WsClient
}

func (*Local) Initialize

func (l *Local) Initialize() *Local

func (*Local) OnClient

func (l *Local) OnClient(from net.Conn)

func (*Local) Start

func (l *Local) Start()

func (*Local) Stop

func (l *Local) Stop()

type Proxy

type Proxy struct {
	Lock    sync.RWMutex
	Address string
	Target  []schema.Target
	Listen  map[string]*Local
	Client  *WsClient
	Conn    *websocket.Conn
}

func (*Proxy) Get

func (p *Proxy) Get(id string) *Local

func (*Proxy) Initialize

func (p *Proxy) Initialize() *Proxy

func (*Proxy) List

func (p *Proxy) List() <-chan *schema.Target

func (*Proxy) Show

func (p *Proxy) Show()

func (*Proxy) Start

func (p *Proxy) Start()

func (*Proxy) Stop

func (p *Proxy) Stop()

func (*Proxy) Update

func (p *Proxy) Update(target []schema.Target)

type WsClient

type WsClient struct {
	Auth      libstar.Auth
	Url       string
	TlsConfig *tls.Config
	Protocol  string
}

func (*WsClient) Dial

func (w *WsClient) Dial() (ws *websocket.Conn, err error)

func (*WsClient) Initialize

func (w *WsClient) Initialize()

Jump to

Keyboard shortcuts

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