Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSPS

func NewSPS() services.Service

Types

type SPS

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

func (*SPS) CheckArgs

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

func (*SPS) Clean

func (s *SPS) Clean()

func (*SPS) GetParentConn

func (s *SPS) GetParentConn(address string) (conn net.Conn, err error)

func (*SPS) HandshakeSocksParent

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

func (*SPS) InitBasicAuth

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

func (*SPS) InitLB

func (s *SPS) InitLB() (err error)

func (*SPS) InitService

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

func (*SPS) IsBasicAuth

func (s *SPS) IsBasicAuth() bool

func (*SPS) LocalUDPKey

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

func (*SPS) OutToTCP

func (s *SPS) OutToTCP(inConn *net.Conn) (lbAddr string, err error)

func (*SPS) ParentUDPKey

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

func (*SPS) Resolve

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

func (*SPS) RunSSUDP

func (s *SPS) RunSSUDP(addr string) (err error)

func (*SPS) Start

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

func (*SPS) StopService

func (s *SPS) StopService()

type SPSArgs

type SPSArgs struct {
	Parent                *[]string
	CertFile              *string
	KeyFile               *string
	CaCertFile            *string
	CaCertBytes           []byte
	CertBytes             []byte
	KeyBytes              []byte
	Local                 *string
	ParentType            *string
	LocalType             *string
	Timeout               *int
	KCP                   kcpcfg.KCPConfigArgs
	ParentServiceType     *string
	DNSAddress            *string
	DNSTTL                *int
	AuthFile              *string
	Auth                  *[]string
	AuthURL               *string
	AuthURLOkCode         *int
	AuthURLTimeout        *int
	AuthURLRetry          *int
	LocalIPS              *[]string
	ParentAuth            *string
	LocalKey              *string
	ParentKey             *string
	LocalCompress         *bool
	ParentCompress        *bool
	SSMethod              *string
	SSKey                 *string
	ParentSSMethod        *string
	ParentSSKey           *string
	DisableHTTP           *bool
	DisableSocks5         *bool
	DisableSS             *bool
	LoadBalanceMethod     *string
	LoadBalanceTimeout    *int
	LoadBalanceRetryTime  *int
	LoadBalanceHashTarget *bool
	LoadBalanceOnlyHA     *bool
	ParentTLSSingle       *bool

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