• 请不要在回答技术问题时复制粘贴 AI 生成的内容
ratazzi
V2EX  ›  程序员

建议针对 Claude, ChatGPT 设置 hosts 文件,而 Surge 这些设置不读取 hosts 文件

  •  
  •   ratazzi ·
    PRO
    ·
    ratazzi · 2h 6m ago · 266 views

    /etc/hosts

    127.0.0.1 api.anthropic.com
    127.0.0.1 claude.ai
    127.0.0.1 chatgpt.com
    127.0.0.1 chat.openai.com
    127.0.0.1 ws.chatgpt.com
    

    然后 Surge 之类的设置不要读取 hosts 文件,这样只有在代理工作时才能正常访问,代理崩溃掉或者开机后启动顺序在 Claude ,ChatGPT 之后也没关系,避免直连

    3 replies    2026-09-16 14:56:27 +08:00
    deng1xia
        1
    deng1xia  
       1h 59m ago
    好想法!
    terrancesiu
        2
    terrancesiu  
       1h 54m ago
    手搓的 kill switch 功能,简单又好用。
    coolcoffee
        3
    coolcoffee  
       1h 48m ago
    已加入 adguardhome dns 重写规则。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5360 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 08:45 · PVG 16:45 · LAX 01:45 · JFK 04:45
    ♥ Do have faith in what you're doing.