socks

package
v0.0.0-...-d4a33fd Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSocks

func NewSocks() services.Service

Types

type Socks

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

func (*Socks) CheckArgs

func (s *Socks) CheckArgs() (err error)

func (*Socks) Clean

func (s *Socks) Clean()

func (*Socks) ConnectSSH

func (s *Socks) ConnectSSH(lbAddr string) (err error)

func (*Socks) GetDirectConn

func (s *Socks) GetDirectConn(address string, localAddr string) (conn net.Conn, err error)

func (*Socks) GetParentConn

func (s *Socks) GetParentConn(parentAddress string, serverConn *socks.ServerConn) (outConn net.Conn, err interface{})

func (*Socks) HandshakeSocksParent

func (s *Socks) HandshakeSocksParent(outconn *net.Conn, network, dstAddr string, auth socks.Auth, fromSS bool) (client *socks.ClientConn, err error)

func (*Socks) InitBasicAuth

func (s *Socks) InitBasicAuth() (err error)

func (*Socks) InitLB

func (s *Socks) InitLB()

func (*Socks) InitService

func (s *Socks) InitService() (err error)

func (*Socks) IsBasicAuth

func (s *Socks) IsBasicAuth() bool

func (*Socks) IsDeadLoop

func (s *Socks) IsDeadLoop(inLocalAddr string, host string) bool

func (*Socks) LocalUDPKey

func (s *Socks) LocalUDPKey() (key []byte)

func (*Socks) ParentUDPKey

func (s *Socks) ParentUDPKey() (key []byte)

func (*Socks) Resolve

func (s *Socks) Resolve(address string) string

func (*Socks) Start

func (s *Socks) Start(args interface{}, log *logger.Logger) (err error)

func (*Socks) StopService

func (s *Socks) StopService()

type SocksArgs

type SocksArgs struct {
	Parent                *[]string
	ParentType            *string
	Local                 *string
	LocalType             *string
	CertFile              *string
	KeyFile               *string
	CaCertFile            *string
	CaCertBytes           []byte
	CertBytes             []byte
	KeyBytes              []byte
	SSHKeyFile            *string
	SSHKeyFileSalt        *string
	SSHPassword           *string
	SSHUser               *string
	SSHKeyBytes           []byte
	SSHAuthMethod         ssh.AuthMethod
	Timeout               *int
	Always                *bool
	Interval              *int
	Blocked               *string
	Direct                *string
	ParentAuth            *string
	AuthFile              *string
	Auth                  *[]string
	AuthURL               *string
	AuthURLOkCode         *int
	AuthURLTimeout        *int
	AuthURLRetry          *int
	KCP                   kcpcfg.KCPConfigArgs
	LocalIPS              *[]string
	DNSAddress            *string
	DNSTTL                *int
	LocalKey              *string
	ParentKey             *string
	LocalCompress         *bool
	ParentCompress        *bool
	Intelligent           *string
	LoadBalanceMethod     *string
	LoadBalanceTimeout    *int
	LoadBalanceRetryTime  *int
	LoadBalanceHashTarget *bool
	LoadBalanceOnlyHA     *bool

	RateLimit      *string
	RateLimitBytes float64
	BindListen     *bool
	Debug          *bool
}

Jump to

Keyboard shortcuts

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