特定电脑上的使用 clash 代理的诡异问题 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
请不要在回答技术问题时复制粘贴 AI 生成的内容
chen0520
V2EX    程序员

特定电脑上的使用 clash 代理的诡异问题

  •  
  •   chen0520 2024 年 8 月 6 日 2539 次点击
    这是一个创建于 546 天前的主题,其中的信息可能已经有所发展或是发生改变。

    软件是 clash-verge(clash for win 也试过,问题同样),访问某个国内域名时:

     curl -v https://chatgpt.chenm.xyz * Uses proxy env variable no_proxy == 'localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16' * Uses proxy env variable https_proxy == 'http://172.26.0.1:7890' * Trying 172.26.0.1:7890... * Connected to 172.26.0.1 (172.26.0.1) port 7890 * CONNECT tunnel: HTTP/1.1 negotiated * allocate connect buffer * Establish HTTP proxy tunnel to chatgpt.chenm.xyz:443 > CONNECT chatgpt.chenm.xyz:443 HTTP/1.1 > Host: chatgpt.chenm.xyz:443 > User-Agent: curl/8.9.0 > Proxy-Connection: Keep-Alive * Recv failure: Connection reset by peer * closing connection #0 

    clash 对应这个网卡的请求没有任何日志,反而有一个本地(127.0.0.1)日志跟随出现

    [TCP] connected lAddr=127.0.0.1:55258 rAddr=stnd-avpg.crsi.symantec.com:443 mode=rule rule=Match() proxy=xxxxxx 

    改成 global ,direct 的情况下,也是对应这个网卡没有任何请求日志,确有个本地日志跟随

    [TCP] connected lAddr=127.0.0.1:55102 rAddr=stnd-avpg.crsi.symantec.com:443 mode=global 

    如果请求次数多了,偶尔会有个不一样的报错

    curl -v https://chatgpt.chenm.xyz * Uses proxy env variable no_proxy == 'localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16' * Uses proxy env variable https_proxy == 'http://172.26.0.1:7890' * Trying 172.26.0.1:7890... * Connected to 172.26.0.1 (172.26.0.1) port 7890 * CONNECT tunnel: HTTP/1.1 negotiated * allocate connect buffer * Establish HTTP proxy tunnel to chatgpt.chenm.xyz:443 > CONNECT chatgpt.chenm.xyz:443 HTTP/1.1 > Host: chatgpt.chenm.xyz:443 > User-Agent: curl/8.9.0 > Proxy-Connection: Keep-Alive > < HTTP/1.1 200 Connection established < * CONNECT phase completed * CONNECT tunnel established, response 200 * ALPN: curl offers h2,http/1.1 * TLSv1.3 (OUT), TLS handshake, Client hello (1): * CAfile: /etc/ssl/certs/ca-certificates.crt * CApath: none * OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to chatgpt.chenm.xyz:443 * closing connection #0 curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to chatgpt.chenm.xyz:443 

    此时 clah 日志打印正常

    [TCP] connected lAddr=172.26.9.33:51702 rAddr=chatgpt.chenm.xyz:443 mode=rule rule=Domain(chatgpt.chenm.xyz) proxy=DIRECT 

    只是这台电脑特有的问题,非常之困惑,如何解决呢?

    6 条回复    2024-08-07 10:18:35 +08:00
    defaw
        1
    defaw  
       2024 年 8 月 6 日
    出现这种情况的时候走 http 代理了没有,没走就是 dns 污染。
    不走 http 代理,走了 tun 且没开 sni 识别的情况下,clash 会查不到你连接的 ip(也就是 dns 污染返回的错误 ip)对应的域名,因为你的 dns 请求没有经过 clash 。
    至于为什么 dns 没有经过 clash ,一种可能的原因:
    部分路由器的 ipv6 的 dns 下发策略有问题,就算你在 win11 上给 ipv6 设置静态地址,你还是会收到路由器下发的 dns 地址,同时 win 的 dns 优先走 ipv6 ,导致 windows 一直在用路由器下发的 dns 服务器,路由器下发的 dns 实际上就是家宽 isp 下发的,基本都有污染。要验证这种情况,打开终端执行下 nslookup google.com ,会显示你用了哪个 dns 服务器。
    chen0520
        2
    chen0520  
    OP
       2024 年 8 月 6 日
    @defaw
    ```
    ;; Got recursion not available from 172.26.0.1 Server: 172.26.0.1 Address: 172.26.0.1#53 Non-authoritative answer: Name: google.com Address: 142.251.43.14
    ```
    为啥只有这一台机器,而且只这个域名有问题呢?
    defaw
        3
    defaw  
       2024 年 8 月 6 日
    你在用旁路由吗,meta 核心作旁路由的话,拦截不到 ipv6 的 dns 查询
    om2mo
        4
    om2mo  
       2024 年 8 月 6 日
    你装了赛门铁克防火墙
    chen0520
        5
    chen0520  
    OP
       2024 年 8 月 7 日
    @om2mo 好像这个防火墙真的有弹出来过,我试试看关了行不行
    chen0520
        6
    chen0520  
    OP
       2024 年 8 月 7 日
    @om2mo 还真是这个防火墙的问题,这我就困惑了啊,我不开代理,你不给我拦截,我开了代理你拦截是几个意思啊。。。。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     3066 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 25ms UTC 10:21 PVG 18:21 LAX 02:21 JFK 05:21
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86