client

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 18 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 {
	Config    *Config
	TLSConfig *tls.Config
	Rules     *Rules
}

Client holds contexts of the client

func NewClient

func NewClient(addr string) *Client

NewClient creates a client

func (*Client) Serve

func (c *Client) Serve() error

Serve starts the server

type Config

type Config struct {
	Addr     string
	Username string
	Password string

	Verify func(string, string) bool

	ServerProtocol string
	ServerAddr     string
	HTTPPath       string
	WSPath         string
}

Config is the client configuration

type Rules added in v0.2.0

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

Rules represents proxy rules

func NewRulesFromFile added in v0.2.0

func NewRulesFromFile(path string) (r *Rules, err error)

NewRulesFromFile creates a Rules object from a rule file

func NewRulesFromMap added in v0.2.0

func NewRulesFromMap(rules map[string]string) (*Rules, error)

NewRulesFromMap creates a Rules object from a map

Jump to

Keyboard shortcuts

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