tunnel

package
v0.0.0-...-2d05422 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugLevel int

DebugLevel todo

View Source
var (
	ErrProxyNotConfigured = errors.New("Proxy is not configured correctly")
)

error

View Source
var IsDebugMode bool

IsDebugMode todo

Functions

func DebugPrint

func DebugPrint(format string, a ...interface{})

DebugPrint todo

func DebugPrintN

func DebugPrintN(level int, format string, a ...interface{})

DebugPrintN todo

func HomePath

func HomePath() string

HomePath todo

func PathConvert

func PathConvert(p string) string

PathConvert todo

Types

type BoringMachine

type BoringMachine struct {
	Setting *ProxySettings // proxy url
	Debug   func(msg string)
}

BoringMachine todo

func (*BoringMachine) DebugPrint

func (bm *BoringMachine) DebugPrint(format string, a ...interface{})

DebugPrint todo

func (*BoringMachine) Dial

func (bm *BoringMachine) Dial(network string, address string) (net.Conn, error)

Dial todo

func (*BoringMachine) DialDirect

func (bm *BoringMachine) DialDirect(network string, address string, timeout time.Duration) (net.Conn, error)

DialDirect todo

func (*BoringMachine) DialTimeout

func (bm *BoringMachine) DialTimeout(network string, address string, timeout time.Duration) (net.Conn, error)

DialTimeout auto dial

func (*BoringMachine) DialTunnel

func (bm *BoringMachine) DialTunnel(network string, address string, timeout time.Duration) (net.Conn, error)

DialTunnel todo

func (*BoringMachine) DialTunnelHTTP

func (bm *BoringMachine) DialTunnelHTTP(u *url.URL, paddr, addr string, timeout time.Duration) (net.Conn, error)

DialTunnelHTTP use http proxy

func (*BoringMachine) DialTunnelSSH

func (bm *BoringMachine) DialTunnelSSH(u *url.URL, paddr, addr string, timeout time.Duration) (net.Conn, error)

DialTunnelSSH dial ssh tunnel (ssh over ssh)

func (*BoringMachine) DialTunnelSocks5

func (bm *BoringMachine) DialTunnelSocks5(u *url.URL, paddr, addr string, timeout time.Duration) (net.Conn, error)

DialTunnelSocks5 todo

func (*BoringMachine) Initialize

func (bm *BoringMachine) Initialize() error

Initialize todo

type ProxySettings

type ProxySettings struct {
	ProxyServer   string
	ProxyOverride string // aka no proxy
	// contains filtered or unexported fields
}

ProxySettings todo

func ResolveProxy

func ResolveProxy() (*ProxySettings, error)

ResolveProxy todo

func (*ProxySettings) Initialize

func (ps *ProxySettings) Initialize() error

Initialize todo

func (*ProxySettings) UseProxy

func (ps *ProxySettings) UseProxy(addr string) bool

UseProxy todo

Jump to

Keyboard shortcuts

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