client

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2018 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenAddr string
	ServerURL  string

	SNI          string
	InsecureCert bool

	Mux bool
}

func (*Config) GetClient

func (config *Config) GetClient() (client *WebSocksClient, err error)

GetClient return client from path

type LocalConn

type LocalConn struct {
	Host string
	// contains filtered or unexported fields
}

func NewLocalConn

func NewLocalConn(conn *net.TCPConn) (lc *LocalConn, err error)

func (*LocalConn) Read

func (lc *LocalConn) Read(p []byte) (n int, err error)

func (*LocalConn) Run

func (lc *LocalConn) Run(ws *core.WebSocket)

func (*LocalConn) Write

func (lc *LocalConn) Write(p []byte) (n int, err error)

type WebSocksClient

type WebSocksClient struct {
	ServerURL  *url.URL
	ListenAddr *net.TCPAddr

	Mux bool

	CreatedAt time.Time
	Stats     *core.Stats
	// contains filtered or unexported fields
}

func (*WebSocksClient) DialWebSocket

func (client *WebSocksClient) DialWebSocket(header map[string][]string) (ws *core.WebSocket, err error)

func (*WebSocksClient) HandleConn

func (client *WebSocksClient) HandleConn(conn *net.TCPConn)

func (*WebSocksClient) OpenMux

func (client *WebSocksClient) OpenMux() (err error)

func (*WebSocksClient) Run

func (client *WebSocksClient) Run() (err error)

func (*WebSocksClient) Stop

func (client *WebSocksClient) Stop()

Jump to

Keyboard shortcuts

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