Chore: improve programming style (#109)
This commit is contained in:
parent
36b5d1f18f
commit
5581698908
1 changed files with 3 additions and 5 deletions
|
@ -153,12 +153,10 @@ func (t *Tunnel) match(metadata *C.Metadata) C.Proxy {
|
|||
|
||||
for _, rule := range t.rules {
|
||||
if rule.IsMatch(metadata) {
|
||||
a, ok := t.proxies[rule.Adapter()]
|
||||
if !ok {
|
||||
continue
|
||||
if a, ok := t.proxies[rule.Adapter()]; ok {
|
||||
log.Infoln("%v match %s using %s", metadata.String(), rule.RuleType().String(), rule.Adapter())
|
||||
return a
|
||||
}
|
||||
log.Infoln("%v match %s using %s", metadata.String(), rule.RuleType().String(), rule.Adapter())
|
||||
return a
|
||||
}
|
||||
}
|
||||
log.Infoln("%v doesn't match any rule using DIRECT", metadata.String())
|
||||
|
|
Loading…
Reference in a new issue