tunnel_client

package module
v0.0.0-...-dcbcd4c Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: MIT Imports: 23 Imported by: 0

README

tunnel-client

HTTP tunnel client over TCP

Documentation

Index

Constants

View Source
const Version = "1.0.3"

Variables

View Source
var HttpClient = &http.Client{
	Transport: &http.Transport{
		MaxIdleConnsPerHost:   1024,
		IdleConnTimeout:       0,
		ExpectContinueTimeout: 1 * time.Second,
		TLSHandshakeTimeout:   0,
		TLSClientConfig: &tls.Config{
			InsecureSkipVerify: true,
		},
		Proxy: nil,
	},
	CheckRedirect: func(req *http.Request, via []*http.Request) error {
		return http.ErrUseLastResponse
	},
}
View Source
var SharedManager = NewManager()

Functions

This section is empty.

Types

type Config

type Config struct {
	Tunnels []*TunnelConfig `yaml:"tunnels"`
}

type Manager

type Manager struct {
}

func NewManager

func NewManager() *Manager

func (*Manager) Start

func (this *Manager) Start() error

type Tunnel

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

tunnel definition

func NewTunnel

func NewTunnel(config *TunnelConfig) *Tunnel

func (*Tunnel) Start

func (this *Tunnel) Start() error

type TunnelConfig

type TunnelConfig struct {
	Remote string   `yaml:"remote"`
	Local  string   `yaml:"local"`
	Host   string   `yaml:"host"`
	Secret string   `yaml:"secret"`
	Root   string   `yaml:"root"`  // static files root
	Index  []string `yaml:"index"` // default index page filenames
	// contains filtered or unexported fields
}

func (*TunnelConfig) LocalHost

func (this *TunnelConfig) LocalHost() string

func (*TunnelConfig) LocalScheme

func (this *TunnelConfig) LocalScheme() string

func (*TunnelConfig) Validate

func (this *TunnelConfig) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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