Skip to content

Domain sniffing

Sniffing attempts to recover a domain from visible HTTP, TLS, or QUIC metadata so domain rules can handle IP-only connections. This example enables detection while retaining the original connection destination.

yaml
sniffer:
  enable: true
  parse-pure-ip: true
  override-destination: false
  sniff:
    HTTP:
      ports: [80, 8080]
    TLS:
      ports: [443, 8443]
    QUIC:
      ports: [443]
  skip-domain:
    - '+.lan'
    - '+.local'
FieldUsage
enableEnable sniffing
sniffConfigure ports for HTTP, TLS, and QUIC; lists accept ports or ranges such as 8000-9000
parse-pure-ipTry sniffing traffic with no known domain
force-dns-mappingForce attempts for redir-host DNS-mapped traffic
override-destinationAllow the detected domain to replace the connection target; a protocol-level value overrides the global setting
force-domainForce attempts for listed domains
skip-domainSkip listed domains
skip-src-address / skip-dst-addressSkip source or destination IP ranges

If a service fails after enabling sniffing, try excluding it or disabling destination override. Sniffing cannot guarantee a domain when encrypted handshakes hide it.

Platform behavior and field status

Use sniffer.sniff for new configurations. Legacy sniffing and port-whitelist apply only when sniff is empty, and are not merged with it.

11 fields shown

FieldTypeiOSmacOStvOSPlatform notes
sniffer.enableBooleanSupportedSupportedSupportedControls sniffing and inclusion/exclusion conditions; use depends on protocol, port, and domain conditions. Does not decrypt all encrypted traffic.
sniffer.force-dns-mappingBooleanSupportedSupportedSupportedControls sniffing and inclusion/exclusion conditions; use depends on protocol, port, and domain conditions. Does not decrypt all encrypted traffic.
sniffer.force-domainListSupportedSupportedSupportedControls sniffing and inclusion/exclusion conditions; use depends on protocol, port, and domain conditions. Does not decrypt all encrypted traffic.
sniffer.override-destinationBooleanSupportedSupportedSupportedSets default destination overriding; an explicit per-protocol value in sniff takes precedence.
sniffer.parse-pure-ipBooleanSupportedSupportedSupportedControls sniffing and inclusion/exclusion conditions; use depends on protocol, port, and domain conditions. Does not decrypt all encrypted traffic.
sniffer.port-whitelistListManaged / limitedManaged / limitedManaged / limitedLegacy syntax, used only when sniff is empty; prefer sniff in new configurations.
sniffer.skip-domainListSupportedSupportedSupportedControls sniffing and inclusion/exclusion conditions; use depends on protocol, port, and domain conditions. Does not decrypt all encrypted traffic.
sniffer.skip-dst-addressListSupportedSupportedSupportedControls sniffing and inclusion/exclusion conditions; use depends on protocol, port, and domain conditions. Does not decrypt all encrypted traffic.
sniffer.skip-src-addressListSupportedSupportedSupportedControls sniffing and inclusion/exclusion conditions; use depends on protocol, port, and domain conditions. Does not decrypt all encrypted traffic.
sniffer.sniffMappingSupportedSupportedSupportedConfigures ports and destination overriding per protocol; takes precedence over legacy sniffing/port-whitelist.
sniffer.sniffingListManaged / limitedManaged / limitedManaged / limitedLegacy syntax, used only when sniff is empty; prefer sniff in new configurations.

Reference: mihomo.