proxy

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAuth is return when a user is not allow to do certain action on a domain
	// most usually it is because the domain is own by someone else
	ErrAuth = errors.New("unauthorized error")
)

Functions

This section is empty.

Types

type Mgr

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

Mgr is configure a TCP router server using redis

func New

func New(pool *redis.Pool) *Mgr

New creates a new TCP router server manager

func (*Mgr) AddProxy

func (r *Mgr) AddProxy(user string, domain, addr string, port, portTLS int) error

AddProxy adds a TCP proxy from domain to addr port is for plain text protocol, usually HTTP portTLS is for TCL protocol, usually HTTPS

func (*Mgr) AddReverseProxy

func (r *Mgr) AddReverseProxy(user string, domain, secret string) error

AddReverseProxy add a reverse tunnel TCP proxy from domain to the TCP connection identityied by secret

func (*Mgr) RemoveProxy

func (r *Mgr) RemoveProxy(user string, domain string) error

RemoveProxy removes a proxy added with AddProxy

func (*Mgr) RemoveReverseProxy

func (r *Mgr) RemoveReverseProxy(user string, domain string) error

RemoveReverseProxy removes a reverse tunnel proxy added with AddReverseProxy

Jump to

Keyboard shortcuts

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