V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Baboonowen
V2EX  ›  分享发现

使用 Cloudflare 自选 IP 优化移动宽带下 Notion 访问

  •  1
     
  •   Baboonowen · 2020-07-16 12:50:59 +08:00 · 2006 次点击
    这是一个创建于 1383 天前的主题,其中的信息可能已经有所发展或是发生改变。

    简明操作

    1. 下载 Cloudflare 边缘节点批量测试工具 ( https://github.com/olixu/cloudflare-ip-ping)
    2. 解压压缩包用 Python 运行 pingip.py ,需要设定两个参数看说明即可;
    3. 批量测试结束过后根据目录内生成的 log 文件选择几个不丢包的 IP,写入系统 hosts 文件,例如西南地区移动家宽可以直接使用:
    # Notion
    104.19.101.15 notion.so
    104.19.92.15 notion.so
    104.19.31.15 notion.so
    104.19.7.15 notion.so
    104.19.72.15 notion.so
    104.19.55.15 notion.so
    104.20.242.15 notion.so
    104.20.235.15 notion.so
    104.20.239.15 notion.so
    172.65.212.15 notion.so
    172.65.70.15 notion.so
    172.67.17.15 notion.so
    104.19.20.15 notion.so
    104.19.191.15 notion.so
    104.19.38.15 notion.so
    104.16.24.15 notion.so
    104.19.21.15 notion.so
    104.19.57.15 notion.so
    104.19.3.15 notion.so
    104.18.153.15 notion.so
    104.19.68.15 notion.so
    104.18.135.15 notion.so
    104.19.86.15 notion.so
    162.159.193.15 notion.so
    162.159.13.15 notion.so
    104.18.235.15 notion.so
    104.19.105.15 notion.so
    162.159.41.15 notion.so
    198.41.193.15 notion.so
    104.18.185.15 notion.so
    104.20.88.15 notion.so
    104.20.169.15 notion.so
    104.20.81.15 notion.so
    104.19.230.15 notion.so
    104.20.236.15 notion.so
    104.19.216.15 notion.so
    104.20.195.15 notion.so
    172.65.37.15 notion.so
    172.65.109.15 notion.so
    172.65.110.15 notion.so
    172.65.2.15 notion.so
    172.65.31.15 notion.so
    172.65.252.15 notion.so
    172.65.43.15 notion.so
    172.65.237.15 notion.so
    172.65.238.15 notion.so
    172.67.18.15 notion.so
    104.19.101.15 www.notion.so
    104.19.92.15 www.notion.so
    104.19.31.15 www.notion.so
    104.19.7.15 www.notion.so
    104.19.72.15 www.notion.so
    104.19.55.15 www.notion.so
    104.20.242.15 www.notion.so
    104.20.235.15 www.notion.so
    104.20.239.15 www.notion.so
    172.65.212.15 www.notion.so
    172.65.70.15 www.notion.so
    172.67.17.15 www.notion.so
    104.19.20.15 www.notion.so
    104.19.191.15 www.notion.so
    104.19.38.15 www.notion.so
    104.16.24.15 www.notion.so
    104.19.21.15 www.notion.so
    104.19.57.15 www.notion.so
    104.19.3.15 www.notion.so
    104.18.153.15 www.notion.so
    104.19.68.15 www.notion.so
    104.18.135.15 www.notion.so
    104.19.86.15 www.notion.so
    162.159.193.15 www.notion.so
    162.159.13.15 www.notion.so
    104.18.235.15 www.notion.so
    104.19.105.15 www.notion.so
    162.159.41.15 www.notion.so
    198.41.193.15 www.notion.so
    104.18.185.15 www.notion.so
    104.20.88.15 www.notion.so
    104.20.169.15 www.notion.so
    104.20.81.15 www.notion.so
    104.19.230.15 www.notion.so
    104.20.236.15 www.notion.so
    104.19.216.15 www.notion.so
    104.20.195.15 www.notion.so
    172.65.37.15 www.notion.so
    172.65.109.15 www.notion.so
    172.65.110.15 www.notion.so
    172.65.2.15 www.notion.so
    172.65.31.15 www.notion.so
    172.65.252.15 www.notion.so
    172.65.43.15 www.notion.so
    172.65.237.15 www.notion.so
    172.65.238.15 www.notion.so
    172.67.18.15 www.notion.so
    172.67.18.15 notion.so
    104.19.101.15 msgstore.www.notion.so
    104.19.92.15 msgstore.www.notion.so
    104.19.31.15 msgstore.www.notion.so
    104.19.7.15 msgstore.www.notion.so
    104.19.72.15 msgstore.www.notion.so
    104.19.55.15 msgstore.www.notion.so
    104.20.242.15 msgstore.www.notion.so
    104.20.235.15 msgstore.www.notion.so
    104.20.239.15 msgstore.www.notion.so
    172.65.212.15 msgstore.www.notion.so
    172.65.70.15 msgstore.www.notion.so
    172.67.17.15 msgstore.www.notion.so
    104.19.20.15 msgstore.www.notion.so
    104.19.191.15 msgstore.www.notion.so
    104.19.38.15 msgstore.www.notion.so
    104.16.24.15 msgstore.www.notion.so
    104.19.21.15 msgstore.www.notion.so
    104.19.57.15 msgstore.www.notion.so
    104.19.3.15 msgstore.www.notion.so
    104.18.153.15 msgstore.www.notion.so
    104.19.68.15 msgstore.www.notion.so
    104.18.135.15 msgstore.www.notion.so
    104.19.86.15 msgstore.www.notion.so
    162.159.193.15 msgstore.www.notion.so
    162.159.13.15 msgstore.www.notion.so
    104.18.235.15 msgstore.www.notion.so
    104.19.105.15 msgstore.www.notion.so
    162.159.41.15 msgstore.www.notion.so
    198.41.193.15 msgstore.www.notion.so
    104.18.185.15 msgstore.www.notion.so
    104.20.88.15 msgstore.www.notion.so
    104.20.169.15 msgstore.www.notion.so
    104.20.81.15 msgstore.www.notion.so
    104.19.230.15 msgstore.www.notion.so
    104.20.236.15 msgstore.www.notion.so
    104.19.216.15 msgstore.www.notion.so
    104.20.195.15 msgstore.www.notion.so
    172.65.37.15 msgstore.www.notion.so
    172.65.109.15 msgstore.www.notion.so
    172.65.110.15 msgstore.www.notion.so
    172.65.2.15 msgstore.www.notion.so
    172.65.31.15 msgstore.www.notion.so
    172.65.252.15 msgstore.www.notion.so
    172.65.43.15 msgstore.www.notion.so
    172.65.237.15 msgstore.www.notion.so
    172.65.238.15 msgstore.www.notion.so
    172.67.18.15 msgstore.www.notion.so
    

    注意事项

    • notion.so, www.notion.so, msgstore.www.notion.so三个域名都需要加入
    • 应该是需要管理员权限才能 ping ;
    • 其他运营商亦可使用这种方法优化访问但是电信联通可能没什么必要;
    • 请勿滥用。

    使用效果

    经西南某地区移动家宽测试,notion 访问时间从 20+s (包含复杂的 dashboard 和数据库载入),变为几秒钟内全部加载完成。简单的页面几乎秒开,推荐使用。

    原理阐释

    Notion 使用 Cloudflare 作内容分发与攻击防御,但该服务在中国的情况比较复杂。
    Cloudflare 通过 anycast 技术智能分配边缘节点,但是中国网络状况复杂,自动分配的节点可能会遭遇较高的丢包(特别是在移动宽带之下),甚至有人直接无法直连 notion 。
    在这里,我们通过测试不丢包的服务器地址并将其在 hosts 文件中指向 notion 即可实现经由最佳服务器的流畅访问。

    Source: 言理( https://quoth.win/943.html)

    9 条回复    2020-07-16 17:33:03 +08:00
    wysnylc
        1
    wysnylc  
       2020-07-16 14:15:35 +08:00
    用 pinginfoview 就行
    Baboonowen
        2
    Baboonowen  
    OP
       2020-07-16 15:36:23 +08:00 via Android
    @wysnylc 这个也有 cf ip 的库吗?
    leafleave
        3
    leafleave  
       2020-07-16 15:42:08 +08:00
    有时候延迟丢包都低,但是传输速率,有没有什么方法测试到不同服务器的传输速率
    cnrting
        4
    cnrting  
       2020-07-16 15:48:24 +08:00 via iPhone
    hosts 放么多。。。另外 cf 现在不是被随机阻断了吗
    Baboonowen
        5
    Baboonowen  
    OP
       2020-07-16 15:53:39 +08:00 via Android
    @leafleave 网上倒是有一个脚本但是有点问题我跑不动
    Baboonowen
        6
    Baboonowen  
    OP
       2020-07-16 15:53:59 +08:00 via Android
    @cnrting 这些挑出来的服务器还行哦
    wysnylc
        7
    wysnylc  
       2020-07-16 16:00:31 +08:00   ❤️ 1
    whileFalse
        8
    whileFalse  
       2020-07-16 16:24:49 +08:00
    加个 requirements.txt 吧。缺包跑不起来。
    Baboonowen
        9
    Baboonowen  
    OP
       2020-07-16 17:33:03 +08:00 via Android
    @wysnylc 哈别人都弄好了呀
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2878 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:04 · PVG 23:04 · LAX 08:04 · JFK 11:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.