tunnel

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout    = 5 * time.Second
	DefaultServerPort = 7654
)

Variables

This section is empty.

Functions

func NewDefaultRemoteDialer added in v0.6.0

func NewDefaultRemoteDialer(mux bool, ts oauth2.TokenSource, url *url.URL) remotedialer.Dialer

func NewIAPRemoteDialer added in v0.3.0

func NewIAPRemoteDialer(mux bool, ts oauth2.TokenSource, instance string, port int, project, zone string) remotedialer.Dialer

func StartProxy added in v0.5.0

func StartProxy(ctx context.Context, addr string, c ProxyConfig) error

func StartServer

func StartServer(addr string, timeout time.Duration, allowedUpstreams []string) error

func StartTcpForward added in v0.5.0

func StartTcpForward(ctx context.Context, addr string, c TcpForwardConfig) error

Types

type ProxyConfig added in v0.5.0

type ProxyConfig struct {
	Rules   []Rule        `yaml:"rules"`
	Timeout time.Duration `yaml:"dial_timeout"`
}

type Rule added in v0.2.0

type Rule struct {
	Tunnel    Tunnel   `yaml:"tunnel"`
	Upstreams []string `yaml:"upstreams"`
}

type TcpForwardConfig

type TcpForwardConfig struct {
	ServiceUrl string
	Instance   string
	Port       int
	Project    string
	Zone       string
	Upstream   string
	MuxEnabled bool
}

type Tunnel added in v0.5.0

type Tunnel struct {
	Instance   string `yaml:"instance"`
	Port       int    `yaml:"port"`
	Project    string `yaml:"project"`
	Zone       string `yaml:"zone"`
	ServiceUrl string `yaml:"service_url"`
	MuxEnabled bool   `yaml:"mux"`
}

Jump to

Keyboard shortcuts

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