client

package
v0.0.0-...-8667f16 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client

func New

func New(cfg *Config) *Client

NewWSConn return new falcon client instance.

func (*Client) CreateProxyConn

func (c *Client) CreateProxyConn(targetAddr string) (io.ReadWriteCloser, error)

CreateProxyConn create a proxy connection through falcon server to target.

func (*Client) ListenAndServe

func (c *Client) ListenAndServe()

ListenAndServe create a local socks5 server.

type Config

type Config struct {
	// local socks5 address for listening.
	Socks5Addr string

	// falcon server host.
	ServerHost string

	// falcon server port.
	ServerPort string

	// lookup flag. if it's false, client will
	// not lookup the server ip and cache it.
	Lookup bool

	// ipv6 flag. if it's true, the ipv6 address
	// of proxy server will be used first.
	IPv6 bool

	// password for proxy service.
	Password string

	// size of connection group.
	ConnGroupSize int
}

Config of client.

Jump to

Keyboard shortcuts

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