V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
sbboy
V2EX  ›  宽带症候群

clash for windows 连不上服务器

  •  
  •   sbboy · 2022-02-21 12:10:12 +08:00 · 4297 次点击
    这是一个创建于 766 天前的主题,其中的信息可能已经有所发展或是发生改变。

    服务器上是 vmess + ws + tls ,用 caddy 做 https 服务器 clash for windows 连接的时候,是直接连的根域名的,这样就到不了 ws 的分流路径。如果根域名设置了跳转,clash 的 log 里就会返回 303 error ,不设置就 404. iOS 上的小火箭是正常的。 请问这种情况该如何处理呢?

    7 条回复    2022-02-21 15:39:48 +08:00
    Googled
        1
    Googled  
       2022-02-21 14:29:16 +08:00   ❤️ 1
    降版本试试,我升级 19.5 就是连不上服务器了,降到 19.4 就行了
    canbingzt
        2
    canbingzt  
       2022-02-21 14:50:59 +08:00   ❤️ 1
    proxies:
    - name: v2ray
    server: example.com
    port: 443
    type: vmess
    uuid: uuid
    alterId: 0
    cipher: auto
    tls: true
    skip-cert-verify: true
    network: ws
    ws-opts:
    path: /v2ray
    headers:
    Host: example.com
    udp: true
    canbingzt
        3
    canbingzt  
       2022-02-21 14:52:27 +08:00
    排版有问题,看这个,还有就是 alterId 这个字段,我服务器配置的 100 ,但是 cfw 里配置 0 才可以
    https://gist.github.com/canbingzt/8107e31a874072037362e3fdbd644487
    DAPTX4869
        4
    DAPTX4869  
       2022-02-21 14:58:28 +08:00   ❤️ 1
    @canbingzt #3 alterID 已经废弃了, 必须设置 0
    zanxj
        5
    zanxj  
       2022-02-21 14:59:37 +08:00   ❤️ 1
    VMESS AEAD 已在 2022 年 1 月 1 日强制启用 请注意更新服务端 移除 alterId 参数
    sbboy
        6
    sbboy  
    OP
       2022-02-21 15:01:12 +08:00
    @canbingzt 感谢,确实是这个问题
    sxfscool
        7
    sxfscool  
       2022-02-21 15:39:48 +08:00   ❤️ 1
    用正则替换一下配置文件中的 header 就可以了
    ws-path: \/([^,]+), ws-headers: \{Host: ([^}]+)\}
    ws-opts: {path: /$1, headers: {Host: $2}}
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3249 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:01 · PVG 20:01 · LAX 05:01 · JFK 08:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.