docs: annotations

This commit is contained in:
mzz2017 2020-12-04 20:18:42 +08:00
parent 05559703a3
commit c2e7b21ce6
2 changed files with 5 additions and 3 deletions

View File

@ -135,15 +135,17 @@ func (p *Proxy) findDialer(network string, dstAddr string) *FwdrGroup {
case "tport": case "tport":
matched = m.Matcher.Match(port) matched = m.Matcher.Match(port)
case "network": case "network":
if network == "tcp" { if strings.HasPrefix(network, "tcp") {
matched = m.Matcher.Match(matcher.TCP) matched = m.Matcher.Match(matcher.TCP)
} else if network == "udp" { } else if strings.HasPrefix(network, "udp") {
matched = m.Matcher.Match(matcher.UDP) matched = m.Matcher.Match(matcher.UDP)
} }
case "sport", "sip": case "sport", "sip":
// TODO: UNSUPPORTED // TODO: UNSUPPORTED
case "app": case "app":
// TODO: UNSUPPORTED // TODO: UNSUPPORTED
// NOTE: should get the inbound conn,
// and there would be a break change for current code structure.
} }
if matched { if matched {
break break

View File

@ -24,7 +24,7 @@ const (
type RoutingA struct { type RoutingA struct {
DefaultOut string DefaultOut string
DomainStrategy DomainStrategy // FIXME: not valid DomainStrategy DomainStrategy // TODO: not valid. there would be some changes for current code structure
Rules []RoutingRule Rules []RoutingRule
} }