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

国内 IP 最近没法直连 Github Copilot 了,但可以通过修改 hosts 来直连

  •  
  •   onll42y · 31 天前 · 1039 次点击

    大约半个月前开始,国内直连 Github Copilot ,服务端会响应 HTTP 503 。

    简单研究了下,发现国内 IP 访问 Github Copilot 时,域名会被解析到其新加坡服务器 IP 上,而新加坡服务器上限制了中国用户的访问。可以通过修改 hosts 文件将 Github Copilot 的域名解析到其美国 IP 上,这样就可以直连了。

    hosts 如下:

    4.249.131.160   proxy.individual.githubcopilot.com # 配置这一项就可以了,保险起见把下面的域名也配置上
    140.82.116.3    github.com
    140.82.116.6    api.github.com
    140.82.112.21   api.individual.githubcopilot.com
    138.91.182.224  copilot-proxy.githubusercontent.com
    140.82.112.21   origin-tracker.githubusercontent.com
    140.82.114.17   githubcopilot.com
    
    1 条回复    2025-05-06 11:37:04 +08:00
    akko
        1
    akko  
       31 天前
    也可以在 IDE 中配置一下 HTTP 代理,比如 VSCode 就在 Setting 中搜索 Http:Proxy 。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2628 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 18ms · UTC 11:54 · PVG 19:54 · LAX 04:54 · JFK 07:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.