client

package
v0.0.0-...-f62b0bc Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 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 Config

type Config struct {
	Log    logger.Config `json:"log,omitempty"`
	Client []WspcConfig  `json:"client,omitempty"`
}

type DynamicProxy

type DynamicProxy interface {
	// Listen local
	Listen()

	// ServeConn conn by wspc
	ServeConn(conn net.Conn) error
}

type HTTPProxy

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

HTTPProxy implement DynamicProxy

func (*HTTPProxy) Listen

func (p *HTTPProxy) Listen()

func (*HTTPProxy) ServeConn

func (p *HTTPProxy) ServeConn(local net.Conn) error

type Socks5Proxy

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

Socks5Proxy implement DynamicProxy

func (*Socks5Proxy) Listen

func (p *Socks5Proxy) Listen()

func (*Socks5Proxy) ServeConn

func (p *Socks5Proxy) ServeConn(conn net.Conn) error

type Wspc

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

func New

func New(config WspcConfig) *Wspc

func (*Wspc) DynamicForward

func (c *Wspc) DynamicForward()

func (*Wspc) ListenAndServe

func (c *Wspc) ListenAndServe()

func (*Wspc) ListenDynamic

func (c *Wspc) ListenDynamic(conf *msg.WspConfig)

func (*Wspc) ListenLocal

func (c *Wspc) ListenLocal(conf *msg.WspConfig)

func (*Wspc) LoadConfig

func (c *Wspc) LoadConfig(channel string) (*msg.WspConfig, error)

func (*Wspc) LocalForward

func (c *Wspc) LocalForward()

func (*Wspc) NewConn

func (c *Wspc) NewConn(data *msg.Data, req *msg.WspRequest) error

func (*Wspc) NewLocalConn

func (c *Wspc) NewLocalConn(local net.Conn, config *msg.WspConfig)

type WspcConfig

type WspcConfig struct {
	Auth    string   `json:"auth,omitempty"`
	Server  string   `json:"server,omitempty"`
	Local   sliceArg `json:"local,omitempty"`
	Remote  sliceArg `json:"remote,omitempty"`
	Dynamic sliceArg `json:"dynamic,omitempty"`
}

Jump to

Keyboard shortcuts

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