From c2e7b21ce6821fda99ed3d2978cbf59ad3f4244a Mon Sep 17 00:00:00 2001 From: mzz2017 Date: Fri, 4 Dec 2020 20:18:42 +0800 Subject: [PATCH] docs: annotations --- rule/proxy.go | 6 ++++-- rule/routingA.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/rule/proxy.go b/rule/proxy.go index 05e0b53..0d97124 100644 --- a/rule/proxy.go +++ b/rule/proxy.go @@ -135,15 +135,17 @@ func (p *Proxy) findDialer(network string, dstAddr string) *FwdrGroup { case "tport": matched = m.Matcher.Match(port) case "network": - if network == "tcp" { + if strings.HasPrefix(network, "tcp") { matched = m.Matcher.Match(matcher.TCP) - } else if network == "udp" { + } else if strings.HasPrefix(network, "udp") { matched = m.Matcher.Match(matcher.UDP) } case "sport", "sip": // TODO: UNSUPPORTED case "app": // TODO: UNSUPPORTED + // NOTE: should get the inbound conn, + // and there would be a break change for current code structure. } if matched { break diff --git a/rule/routingA.go b/rule/routingA.go index ddd0d5f..1260624 100644 --- a/rule/routingA.go +++ b/rule/routingA.go @@ -24,7 +24,7 @@ const ( type RoutingA struct { DefaultOut string - DomainStrategy DomainStrategy // FIXME: not valid + DomainStrategy DomainStrategy // TODO: not valid. there would be some changes for current code structure Rules []RoutingRule }