proxy

package
v0.0.0-...-a142604 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2017 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConn

type ClientConn struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ClientConn client <-> proxy

func (*ClientConn) Close

func (c *ClientConn) Close() error

Close client

func (*ClientConn) Handshake

func (c *ClientConn) Handshake() error

Handshake between client and proxy.

func (*ClientConn) IsAllowConnect

func (c *ClientConn) IsAllowConnect() bool

IsAllowConnect check ip in whitelist.

func (*ClientConn) Run

func (c *ClientConn) Run()

Run after handshake.

type Server

type Server struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Server proxy daemon

func NewServer

func NewServer(cfg *config.Config) (*Server, error)

NewServer create proxy.

func (*Server) Close

func (p *Server) Close()

Close proxy server.

func (*Server) GetConnection

func (p *Server) GetConnection(connectionID uint32) *ClientConn

GetConnection get connection

func (*Server) RemoveConnection

func (p *Server) RemoveConnection(connectionID uint32)

RemoveConnection remove connection

func (*Server) Run

func (p *Server) Run()

Run proxy server.

Jump to

Keyboard shortcuts

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