Skip to content

fix: detect CERT_DOMAIN by CSV header - #9

Open
BaoZhiFei wants to merge 1 commit into
V2RaySSR:mainfrom
BaoZhiFei:fix/realitlscanner-csv-compat
Open

fix: detect CERT_DOMAIN by CSV header#9
BaoZhiFei wants to merge 1 commit into
V2RaySSR:mainfrom
BaoZhiFei:fix/realitlscanner-csv-compat

Conversation

@BaoZhiFei

Copy link
Copy Markdown

背景

新版 RealiTLScanner CSV 在 CERT_DOMAIN 前增加了 TLS、ALPN、
CURVE 等字段。RealityChecker 当前固定读取第三列,因此会把 TLS
版本当作域名,导致无法正确筛选扫描结果。

修改

  • 根据表头名称定位 CERT_DOMAIN,不再依赖固定列号
  • 兼容 UTF-8 BOM、表头大小写和首尾空格
  • CSV 为空或缺少 CERT_DOMAIN 时返回明确错误
  • 忽略证书占位文本等不符合域名语法的值
  • 移除域名语法检查中无实际作用的 DNS 查询
  • 增加旧版 CSV、新版 CSV、BOM 和缺失表头测试

验证

  • go test ./...
  • go vet ./...
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant