V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
silverwolf

Cloudflare for SaaS 使用 ECH

  •  
  •   silverwolf · Sep 27, 2024 · 2548 views
    This topic created in 591 days ago, the information mentioned may be changed or developed.

    亲测发现,对于不使用 Cloudflare NS 的自定义主机域名启用 ECH 只需要复制回退源( Fallback Origin)的 HTTPS 记录(包含 ech=AEX+....)添加到自定义域名即可开启 SNI 加密。

    操作:

    1 查询回退源 https 记录

    dig +short your-fallback-origin.com https
    

    2 在 dnspod 、阿里云解析... 添加 HTTPS 记录。

    3 校验:打开 /cdn-cgi/trace,看到 sni=encrypted ( ech 不支持浏览器使用透明代理)

    其他问题:

    • ech=AEX+.... 包含一串未知内容 base64 编码的二进制。同一个 cloudflare 接入域名下的每个主机的 ech 值完全一至。猜测跟主机名没关系,应该是通用的。
    7 replies    2024-10-02 11:34:27 +08:00
    abersheeran
        1
    abersheeran  
       Sep 27, 2024
    我托管在 Cloudflare 上的域名也是 sni=plaintext
    Lentin
        2
    Lentin  
       Sep 27, 2024
    @abersheeran #1 你访问目标网站需要用 doh 的 dns 才可以实现 ech 通信
    Lentin
        3
    Lentin  
       Sep 27, 2024
    @Lentin #2 抱歉,普通 dns 也可以实现 ech 通信, doh 的 dns 是之前的 esni 的要求
    abersheeran
        4
    abersheeran  
       Sep 27, 2024
    @Lentin #2 我不太懂,如果普通 DNS 也行,那为什么我这个不能 ECH
    silverwolf
        5
    silverwolf  
    OP
       Sep 27, 2024
    @abersheeran 关闭所有浏览器代理。开代理无法使用 ech
    Lentin
        6
    Lentin  
       Sep 27, 2024
    @abersheeran #4 还有一点是需要你的 dns 服务器能正确返回域名的 https 类型记录
    Cert
        7
    Cert  
       Oct 2, 2024 via Android
    @Lentin openDNS 不行啊,用了 DoH 还是不行😩
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6247 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 54ms · UTC 03:23 · PVG 11:23 · LAX 20:23 · JFK 23:23
    ♥ Do have faith in what you're doing.