diff --git a/component/sniffer/dispatcher.go b/component/sniffer/dispatcher.go index cfcc58fb..cca8f719 100644 --- a/component/sniffer/dispatcher.go +++ b/component/sniffer/dispatcher.go @@ -12,7 +12,6 @@ import ( CN "github.com/Dreamacro/clash/common/net" "github.com/Dreamacro/clash/common/utils" - "github.com/Dreamacro/clash/component/resolver" C "github.com/Dreamacro/clash/constant" "github.com/Dreamacro/clash/log" ) @@ -84,8 +83,7 @@ func (sd *SnifferDispatcher) replaceDomain(metadata *C.Metadata, host string) { metadata.AddrType = C.AtypDomainName metadata.Host = host - metadata.DNSMode = C.DNSMapping - resolver.InsertHostByIP(metadata.DstIP, host) + metadata.DNSMode = C.DNSNormal } func (sd *SnifferDispatcher) Enable() bool { diff --git a/config/config.go b/config/config.go index 882a2de8..bef6efa1 100644 --- a/config/config.go +++ b/config/config.go @@ -977,7 +977,8 @@ func parseSniffer(snifferRaw RawSniffer) (*Sniffer, error) { var ports []utils.Range[uint16] if len(snifferRaw.Ports) == 0 { - ports = append(ports, *utils.NewRange[uint16](0, 65535)) + ports = append(ports, *utils.NewRange[uint16](80, 80)) + ports = append(ports, *utils.NewRange[uint16](443, 443)) } else { for _, portRange := range snifferRaw.Ports { portRaws := strings.Split(portRange, "-")