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 }