mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
fix typo (#1503)
This commit is contained in:
parent
e8949234fd
commit
d24c276cc5
@ -27,7 +27,7 @@ type Balancer struct {
|
|||||||
override override
|
override override
|
||||||
}
|
}
|
||||||
|
|
||||||
// PickOutbound picks the tag of a outbound
|
// PickOutbound picks the tag of an outbound
|
||||||
func (b *Balancer) PickOutbound() (string, error) {
|
func (b *Balancer) PickOutbound() (string, error) {
|
||||||
candidates, err := b.SelectOutbounds()
|
candidates, err := b.SelectOutbounds()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -149,7 +149,7 @@ type PortMatcher struct {
|
|||||||
onSource bool
|
onSource bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewPortMatcher create a new port matcher that can match source or destination port
|
// NewPortMatcher creates a new port matcher that can match source or destination port
|
||||||
func NewPortMatcher(list *net.PortList, onSource bool) *PortMatcher {
|
func NewPortMatcher(list *net.PortList, onSource bool) *PortMatcher {
|
||||||
return &PortMatcher{
|
return &PortMatcher{
|
||||||
port: net.PortListFromProto(list),
|
port: net.PortListFromProto(list),
|
||||||
|
@ -126,7 +126,7 @@ func (r *Router) Close() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type implement common.HasType.
|
// Type implements common.HasType.
|
||||||
func (*Router) Type() interface{} {
|
func (*Router) Type() interface{} {
|
||||||
return routing.RouterType()
|
return routing.RouterType()
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ type WeightManager struct {
|
|||||||
defaultWeight float64
|
defaultWeight float64
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get get the weight of specified tag
|
// Get gets the weight of specified tag
|
||||||
func (s *WeightManager) Get(tag string) float64 {
|
func (s *WeightManager) Get(tag string) float64 {
|
||||||
weight, ok := s.cache[tag]
|
weight, ok := s.cache[tag]
|
||||||
if ok {
|
if ok {
|
||||||
|
@ -133,7 +133,7 @@ type MatcherGroupForRegex interface {
|
|||||||
AddRegexMatcher(matcher *RegexMatcher, value uint32)
|
AddRegexMatcher(matcher *RegexMatcher, value uint32)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddMatcherGroup is a helper function to try to add a Matcher to any kind of MatcherGroup.
|
// AddMatcherToGroup is a helper function to try to add a Matcher to any kind of MatcherGroup.
|
||||||
// It returns error if the MatcherGroup does not accept the provided Matcher's type.
|
// It returns error if the MatcherGroup does not accept the provided Matcher's type.
|
||||||
// This function is provided to help writing code to test a MatcherGroup.
|
// This function is provided to help writing code to test a MatcherGroup.
|
||||||
func AddMatcherToGroup(g MatcherGroup, matcher Matcher, value uint32) error {
|
func AddMatcherToGroup(g MatcherGroup, matcher Matcher, value uint32) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user