mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-12-02 07:06:47 +00:00
Fix: redir-host should lookup hosts
This commit is contained in:
1 parent
d1fd57c432
commit
e5379558f6
1 file changed
+3
@@ -147,6 +147,9 @@ func preHandleMetadata(metadata *C.Metadata) error {
|
||||
metadata.AddrType = C.AtypDomainName
|
||||
if enhancedMode.FakeIPEnabled() {
|
||||
metadata.DstIP = nil
|
||||
} else if node := resolver.DefaultHosts.Search(host); node != nil {
|
||||
// redir-host should lookup the hosts
|
||||
metadata.DstIP = node.Data.(net.IP)
|
||||
}
|
||||
} else if enhancedMode.IsFakeIP(metadata.DstIP) {
|
||||
return fmt.Errorf("fake DNS record %s missing", metadata.DstIP)
|
||||
|
||||
Reference in new issue
Block a user