cary-sas / v2ray_bin

梅林380 固件的魔改科学上网插件
574 stars 128 forks source link

trojan-go wih CDN and Websocket 连接不上 #52

Open evilheart1024 opened 1 year ago

evilheart1024 commented 1 year ago

/tmp中的log显示 [ERROR] 2022/12/15 11:33:03 github.com/p4gefau1t/trojan-go/proxy.(*Proxy).relayConnLoop.func1.1:proxy.go:66 proxy failed to dial connection | websocket failed to handshake with server | malformed HTTP response "\x00\x00\x12\x04\x00\x00\x00\x00\x00\x00\x03\x00\x00\x01\x00\x00\x04\x00\x01\x00\x00\x00\x05\x00\xff\xff\xff\x00\x00\x04\b\x00\x00\x00\x00\x00\x7f\xff\x00\x00\x00\x00\b\a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"

但是同样的节点配置在merlin clash, 手机V2rayNG上, win 版V2rayN, 都可以连上。 服务器SSL申请已经切换成Zerossl.

cary-sas commented 1 year ago

你把SNI 里面也填上“伪装域名”试试

evilheart1024 commented 1 year ago

服务器,sni, host都填了同样的域名

evilheart1024 commented 1 year ago

补充一下, server IP 443端口被墙, 所以套用了cloudflare CDN. 服务器上trojan-go access log无记录

cary-sas commented 1 year ago

我自己试了一下,不套CDN IP 就可以连 (SNI 留空),套上了就连不了,需要找找原因

cary-sas commented 1 year ago

3 github.com/p4gefau1t/trojan-go/proxy.(*Proxy).relayConnLoop.func1.1:proxy.go:66 proxy failed to dial connection | websocket failed to handshake with server | malformed HTTP response 你试试换成 fullchain的证书 https://github.com/p4gefau1t/trojan-go/issues/187

evilheart1024 commented 1 year ago

一直用的fullchain.cer alpn里面也改成http1.1了

evilheart1024 commented 1 year ago

有眉目了么? 或者有没有考虑用Xray core来连trojan go?

cary-sas commented 1 year ago

我的印象是,xray core 是无法做 trojan go的客户端的

cary-sas commented 1 year ago

有眉目了么? 或者有没有考虑用Xray core来连trojan go? 找到解决办法了,把客户端 SNI 填成 二级主域名 (@root) 二进制暂时撤回到原版本

Trojan-Go v0.10.6
Go Version: go1.17.1
OS/Arch: linux/arm
Git Commit: 2dc60f52e79ff8b910e78e444f1e80678e936450
Potterli20 commented 1 year ago

给个配置文件吧

ghost commented 1 year ago

如果是 cloudflare CDN,请在 SSL/TLS设置中将加密模式改为“灵活”。

或者使用非 443 的 https 端口。

Potterli20 commented 1 year ago

如果是 cloudflare CDN,请在 SSL/TLS设置中将加密模式改为“灵活”。

或者使用非 443 的 https 端口。

没有用的,日记问题是h2的问题