clash for windows 连不上服务器

2022-02-21 12:10:12 +08:00
 sbboy

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

4356 次点击
所在节点    宽带症候群
7 条回复
Googled
2022-02-21 14:29:16 +08:00
降版本试试,我升级 19.5 就是连不上服务器了,降到 19.4 就行了
canbingzt
2022-02-21 14:50:59 +08:00
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
2022-02-21 14:52:27 +08:00
排版有问题,看这个,还有就是 alterId 这个字段,我服务器配置的 100 ,但是 cfw 里配置 0 才可以
https://gist.github.com/canbingzt/8107e31a874072037362e3fdbd644487
DAPTX4869
2022-02-21 14:58:28 +08:00
@canbingzt #3 alterID 已经废弃了, 必须设置 0
zanxj
2022-02-21 14:59:37 +08:00
VMESS AEAD 已在 2022 年 1 月 1 日强制启用 请注意更新服务端 移除 alterId 参数
sbboy
2022-02-21 15:01:12 +08:00
@canbingzt 感谢,确实是这个问题
sxfscool
2022-02-21 15:39:48 +08:00
用正则替换一下配置文件中的 header 就可以了
ws-path: \/([^,]+), ws-headers: \{Host: ([^}]+)\}
ws-opts: {path: /$1, headers: {Host: $2}}

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/835369

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX