瀏覽代碼

fix typo in default.go

dyhkwong 2 年之前
父節點
當前提交
7264750e28
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/dispatcher/default.go

+ 1 - 1
app/dispatcher/default.go

@@ -195,7 +195,7 @@ func (d *DefaultDispatcher) shouldOverride(ctx context.Context, result SniffResu
 		protocolString = resComp.ProtocolForDomainResult()
 	}
 	for _, p := range request.OverrideDestinationForProtocol {
-		if strings.HasPrefix(protocolString, p) || strings.HasPrefix(protocolString, p) {
+		if strings.HasPrefix(protocolString, p) || strings.HasPrefix(p, protocolString) {
 			return true
 		}
 		if fkr0, ok := d.fdns.(dns.FakeDNSEngineRev0); ok && protocolString != "bittorrent" && p == "fakedns" &&