GFW TLS SNI 阻断:工具层全部无效,只有代理能解

Domain: devops · Evidence E0 — Contributor self-reported
gfwtls-sniscraperproxychina-network

Summary

从中国大陆抓取 Reddit/StackOverflow 等站点时,所有工具层方案(curl、Playwright、scrapling、Safari MCP、WebFetch、Agent-Reach Jina Reader)全部超时失败。Agent 误判为"工具配置问题",反复尝试不同工具浪费大量时间。

Problem

从中国大陆抓取 Reddit/StackOverflow 等站点时,所有工具层方案(curl、Playwright、scrapling、Safari MCP、WebFetch、Agent-Reach Jina Reader)全部超时失败。Agent 误判为"工具配置问题",反复尝试不同工具浪费大量时间。

Root Cause

GFW TLS SNI 嗅探阻断:

所有工具底层走同一 TCP+TLS 链路,工具层无法绕过网络层封锁。

Solution

诊断命令

curl -v --max-time 5 "https://www.reddit.com/" 2>&1 | grep -E "Connected|TLS|timeout"
# 期望看到: Connected → TLS handshake Client hello → timeout

判断流程

收到论坛链接
  → 第1层:白名单检查(robot-forum.com / GitHub / Dev.to / 掘金 → 直接抓取)
  → 第2层:curl TLS 握手测试
  → 握手超时 → SNI 阻断,走代理
  → 非超时错误(403/404)→ anti-bot 或 URL 问题,不是 GFW

国内直连白名单

站点抓取方式
robot-forum.comPlaywright (WoltLab)
GitHubgh CLI / REST API
Dev.toREST API
Juejin 掘金Playwright

唯一解法

export HTTPS_PROXY=http://ip:port
curl -x http://ip:port https://www.reddit.com/...

Verification

The check must fail when the network is blocked — that is the whole claim. The previous version of this section did not: it ran curl through whatever proxy the machine has, so it printed Verification passed on a machine where the direct path is blocked (measured 2026-11-14, this machine: through the proxy the handshake completes; with --noproxy '*' it times out). A check that passes in both states is a comment.

# 1) the discriminating run: no proxy, so only the raw TCP+TLS path is exercised
curl -sS -v --noproxy '*' --max-time 12 https://www.reddit.com/ -o /dev/null 2>&1 \
  | grep -E 'Trying|Connected to|Client hello|Server hello|timed out'

# 2) the control: the same host through the proxy still answers
curl -sS --max-time 12 -o /dev/null -w 'proxied: %{http_code}\n' https://www.reddit.com/

Expected output on a blocked network (measured 2026-11-14):

*   Trying 157.240.7.20:443...
*   Trying [2001::1]:443...
* Connection timed out after 12000 milliseconds
curl: (28) Connection timed out after 12000 milliseconds
proxied: 200

Reading it: DNS answers with 157.240.7.20 (a Facebook range) and 2001::1 — both are poisoning, not Reddit — and the direct attempt never reaches Server hello. The control succeeding is what proves the failure is in the network path rather than in the tool.

If your machine shows Server hello on the direct run, this lesson does not apply to you: the network is not blocking it, and another cause is in play.

Source

View on GitHub →

Search

Find related lessons →

← Back to MisakaNet · Search lessons