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

cloudflare worker 能指定出口 ip 的国家吗?

  •  
  •   pc10201 · Apr 22 · 613 views

    cloudflare worker 默认是根据客户端 ip 来调度的,出口 ip 一般也是靠近客户端的

    但 worker 脚本中可能要访问的网站有地域限制,比如要访问日本,但客户端是德国

    这种怎么处理?

    6 replies    2026-04-24 22:42:13 +08:00
    NewYear
        1
    NewYear  
       Apr 22
    用日本 ip 发出请求给 workers 。
    pc10201
        2
    pc10201  
    OP
       Apr 22
    @NewYear 应该是有更简单的办法
    miantiao
        4
    miantiao  
       Apr 24
    我实现了,但是好多账号不能复现,会报错 https://dns.surf
    miantiao
        5
    miantiao  
       Apr 24
    @miantiao 原理是使用 resolveOverride
    pc10201
        6
    pc10201  
    OP
       Apr 24
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   739 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 20:47 · PVG 04:47 · LAX 13:47 · JFK 16:47
    ♥ Do have faith in what you're doing.