p4gefau1t / trojan-go

Go实现的Trojan代理,支持多路复用/路由功能/CDN中转/Shadowsocks混淆插件,多平台,无依赖。A Trojan proxy written in Go. An unidentifiable mechanism that helps you bypass GFW. https://p4gefau1t.github.io/trojan-go/
GNU General Public License v3.0
7.54k stars 1.64k forks source link

[BUG]无法建立tls握手 #483

Closed ghost closed 1 year ago

ghost commented 1 year ago

ubuntu 20.04的AWS VPS,移动网络,最新版本,之前没用过。 多次测试IP和端口均没被封禁。同一台主机的工作在别的端口的Vmess连接正常。 1 (1)

唯一建立真连接成功了的是我用迷雾通的全局代理以后用V2rayN才建立成功,确实有数据传输,别的全是tls handshake failed

1 (2)

服务端的日志如下

[ERROR] 14:45:24 github.com/p4gefau1t/trojan-go/tunnel/tls.(Server).acceptLoop.func1:server.go:140 tls handshake failed | read tcp 172.31.40.84:443->本地地址:2812: read: connection reset by peer [INFO] 14:45:24 tcp connection from 本地地址 [ERROR] 14:45:24 github.com/p4gefau1t/trojan-go/tunnel/tls.(Server).acceptLoop.func1:server.go:140 tls handshake failed | read tcp 172.31.40.84:443->本地地址:2813: read: connection reset by peer [FATAL] 14:45:37 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [INFO] 14:45:38 tcp connection from 第三方平台:60892 [ERROR] 14:45:38 github.com/p4gefau1t/trojan-go/tunnel/tls.(Server).acceptLoop.func1:server.go:140 tls handshake failed | EOF [FATAL] 14:45:53 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [FATAL] 14:46:08 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [FATAL] 14:46:23 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [FATAL] 14:46:38 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [FATAL] 14:46:54 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [FATAL] 14:47:09 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [FATAL] 14:47:24 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [FATAL] 14:47:39 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [INFO] 14:47:41 tcp connection from 迷雾通:64708 [ERROR] 14:47:42 github.com/p4gefau1t/trojan-go/tunnel/tls.(Server).acceptLoop.func1:server.go:140 tls handshake failed | EOF [INFO] 14:47:45 tcp connection from 迷雾通:57638 [INFO] 14:47:45 tls connection from 迷雾通:57638 [INFO] 14:47:52 user 9a740a96127536feec37745da1f1e90189a4d69df37277a325c51577 from 迷雾通:57638 tunneling to cachefly.cachefly.net:80 closed sent: 3.22 MiB recv: 75 B [FATAL] 14:47:55 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [INFO] 14:48:10 tcp connection from 第三方平台:33130 [ERROR] 14:48:10 github.com/p4gefau1t/trojan-go/tunnel/tls.(Server).acceptLoop.func1:server.go:140 tls handshake failed | EOF [FATAL] 14:48:10 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [INFO] 14:48:24 tcp connection from 迷雾通:15392 [FATAL] 14:48:25 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [INFO] 14:48:26 tls connection from 迷雾通:15392 [INFO] 14:48:27 user 9a740a96127536feec37745da1f1e90189a4d69df37277a325c51577 from 迷雾通:15392 tunneling to www.google.com:443 closed sent: 444 B recv: 537 B [INFO] 14:48:39 tcp connection from 本地地址:2640 [ERROR] 14:48:39 github.com/p4gefau1t/trojan-go/tunnel/tls.(Server).acceptLoop.func1:server.go:140 tls handshake failed | EOF [FATAL] 14:48:40 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [FATAL] 14:48:56 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [INFO] 14:48:57 tcp connection from 本地地址:2648 [ERROR] 14:48:57 github.com/p4gefau1t/trojan-go/tunnel/tls.(Server).acceptLoop.func1:server.go:140 tls handshake failed | read tcp 172.31.40.84:443->本地地址:2648: read: connection reset by peer [FATAL] 14:49:11 github.com/p4gefau1t/trojan-go/proxy.(Option).Handle:option.go:78 listen tcp 0.0.0.0:443: bind: address already in use [INFO] 14:49:17 tcp connection from 本地地址:2664 [ERROR] 14:49:17 github.com/p4gefau1t/trojan-go/tunnel/tls.(*Server).acceptLoop.func1:server.go:140 tls handshake failed | read tcp 172.31.40.84:443->本地地址:2664: read: connection reset by peer

配置文件如下 { "run_type": "server", "local_addr": "0.0.0.0", "local_port": 443, "remote_addr": "139.224.234.117", "remote_port": 80, "log_level": 1, "log_file": "/usr/local/bin/trojan-go", "password": [ "XXXX" ], "ssl": { "cert": "server.crt", "key": "server.key" } }

V2rayN客户端如下

[Info] infra/conf/serial: Reading config: stdin: [Warning] core: Xray 1.5.5 started 127.0.0.1:55804 accepted http://cachefly.cachefly.net/10mb.test [http10912 -> proxy10912] [Warning] [2406008704] proxy/http: failed to read response from cachefly.cachefly.net > io: read/write on closed pipe

[Info] infra/conf/serial: Reading config: stdin: [Warning] core: Xray 1.5.5 started 127.0.0.1:55874 accepted //www.google.com:443 [http10912 -> proxy10912] 127.0.0.1:55876 accepted //www.google.com:443 [http10912 -> proxy10912]

[Info] infra/conf/serial: Reading config: stdin: [Warning] core: Xray 1.5.5 started 127.0.0.1:55930 accepted http://cachefly.cachefly.net/10mb.test [http10913 -> proxy10913] [Warning] [82793283] proxy/http: failed to read response from cachefly.cachefly.net > io: read/write on closed pipe

fengmikaelson commented 1 year ago

一样~不过,我同一条线路,在A处办公不行用,B处可以。两条不同的宽带。 最近运营商应该再搞啥。。。

ghost commented 1 year ago

可能是域名问题,eu.org被移动阻断了

fengmikaelson commented 1 year ago

一样~不过,我同一条线路,在A处办公不行用,B处可以。两条不同的宽带。 最近运营商应该再搞啥。。。

我怎么想都是GFW

我这里问了,是区域这里搞净网行动。。。