outbound

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FilterInput_Name            = "name"
	FilterInput_SubscriptionTag = "subtag"
	FilterInput_Link            = "link"
)
View Source
const (
	FilterKey_Name_Regex   = "regex"
	FilterKey_Name_Keyword = "keyword"

	FilterInput_SubscriptionTag_Regex = "regex"
)

Variables

View Source
var NoAliveDialerError = fmt.Errorf("no alive dialer")

Functions

This section is empty.

Types

type DialerGroup

type DialerGroup struct {
	netproxy.Dialer

	Name string

	Dialers []*dialer.Dialer
	// contains filtered or unexported fields
}

func NewDialerGroup

func NewDialerGroup(option *dialer.GlobalOption, name string, dialers []*dialer.Dialer, p DialerSelectionPolicy, aliveChangeCallback func(alive bool, networkType *dialer.NetworkType, isInit bool)) *DialerGroup

func (*DialerGroup) Close

func (g *DialerGroup) Close() error

func (*DialerGroup) GetSelectionPolicy

func (g *DialerGroup) GetSelectionPolicy() (policy consts.DialerSelectionPolicy)

func (*DialerGroup) MustGetAliveDialerSet

func (d *DialerGroup) MustGetAliveDialerSet(typ *dialer.NetworkType) *dialer.AliveDialerSet

func (*DialerGroup) Select

func (g *DialerGroup) Select(networkType *dialer.NetworkType) (d *dialer.Dialer, latency time.Duration, err error)

Select selects a dialer from group according to selectionPolicy.

func (*DialerGroup) SetSelectionPolicy

func (g *DialerGroup) SetSelectionPolicy(policy DialerSelectionPolicy)

type DialerSelectionPolicy

type DialerSelectionPolicy struct {
	Policy     consts.DialerSelectionPolicy
	FixedIndex int
}

func NewDialerSelectionPolicyFromGroupParam

func NewDialerSelectionPolicyFromGroupParam(param *config.Group) (policy *DialerSelectionPolicy, err error)

type DialerSet

type DialerSet struct {
	// contains filtered or unexported fields
}
func NewDialerSetFromLinks(option *dialer.GlobalOption, tagToNodeList map[string][]string) *DialerSet

func (*DialerSet) Close

func (s *DialerSet) Close() error

func (*DialerSet) Filter

func (s *DialerSet) Filter(filters []*config_parser.Function) (dialers []*dialer.Dialer, err error)

Directories

Path Synopsis
transport
tls
ws

Jump to

Keyboard shortcuts

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