Skip to content

Domain sniffing incorrectly handles B站 CDN domain, only gets "bfs" without full domain name #3485

@sndai

Description

@sndai

Version: v4.44.0 and v5.x.x

Problem:
When accessing Bilibili website, v2ray's domain sniffing only gets "bfs" instead of the full CDN domain (should be something like *.bfs.biliapi.net). This leads to DNS resolution failures as "bfs" is not a valid domain.

Logs:

2025/08/23 05:23:15 [Info] [3758540630] proxy/socks: TCP Connect request to tcp:bfs:443
2025/08/23 05:23:15 [Info] [3758540630] app/dispatcher: sniffed domain: bfs
...
2025/08/23 05:23:15 [Info] app/dns: failed to lookup ip for domain bfs at server UDP:8.8.8.8:53 > rcode: 3
2025/08/23 05:23:15 [Info] features/routing/dns: resolve ip for bfs > rcode: 3

Expected behavior:
Domain sniffing should get the complete domain name for Bilibili's CDN requests, similar to how it handles other domains. For example:

tcp:127.0.0.1:56194 accepted tcp:passport.bilibili.com:443 [direct]

Current workaround:
Added routing rule to handle "bfs" specifically:

{
  "type": "field",
  "outboundTag": "direct",
  "domain": [
    "full:bfs",
    "geosite:cn"
  ]
}

Environment:
OS: Windows 10 x64 22H2
V2Ray version: Both v4.44.0 and v5.x.x exhibit this behavior

Additional context:
This issue appears consistently when accessing Bilibili website. The domain sniffing works correctly for other Bilibili domains (like api.bilibili.com, passport.bilibili.com) but fails specifically for their CDN domain, only getting "bfs" instead of the full domain name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions