Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] cdn+ws+shadowsocks 不能访问 #278

Closed
qist opened this issue Mar 10, 2021 · 3 comments · Fixed by #312
Closed

[BUG] cdn+ws+shadowsocks 不能访问 #278

qist opened this issue Mar 10, 2021 · 3 comments · Fixed by #312

Comments

@qist
Copy link

qist commented Mar 10, 2021

简单描述这个 Bug

cdn+ws+shadowsocks 不能访问

如何复现这个 Bug

开启shadowsocks 配置出现
在此描述复现这个Bug所需要的操作步骤
此版本正常
Trojan-Go v0.8.2
Go Version: go1.15.2
OS/Arch: linux/amd64
Git Commit: d051cf4

Developed by PageFault (p4gefau1t)
Licensed under GNU General Public License version 3
GitHub Repository: https://github.com/p4gefau1t/trojan-go
Trojan-Go Documents: https://p4gefau1t.github.io/trojan-go/
root@qist:/usr/local/bin#

服务器和客户端环境信息

服务器环境
Linux qist 5.8.0-44-generic #50-Ubuntu SMP Tue Feb 9 06:29:41 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
客户端环境
Linux Qist 4.4.0-19041-Microsoft #488-Microsoft Mon Sep 01 13:43:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux
在此描述你的服务器和客户端所处的网络环境,系统架构,以及其他信息

服务端日志

[INFO] 2021/03/10 10:55:01 trojan-go v0.8.2-27-gfd129c2 initializing
[INFO] 2021/03/10 10:55:31 tcp connection from 172.69.34.172:50520
[INFO] 2021/03/10 10:55:31 tls connection from 172.69.34.172:50520
[WARN] 2021/03/10 10:55:31 connection with invalid trojan header from 172.69.34.172:50520 | failed to read hash | repeated salt detected
[WARN] 2021/03/10 10:55:31 redirecting connection from 172.69.34.172:50520 to 127.0.0.1:80
[ERROR] 2021/03/10 10:55:31 github.com/p4gefau1t/trojan-go/redirector.(*Redirector).worker.func1:redirector.go:73 failed to redirect | readfrom tcp 127.0.0.1:50446->127.0.0.1:80: cipher: message authentication failed
[INFO] 2021/03/10 10:55:31 redirection done
[INFO] 2021/03/10 10:55:32 tcp connection from 172.69.34.172:51768
[INFO] 2021/03/10 10:55:32 tls connection from 172.69.34.172:51768
[WARN] 2021/03/10 10:55:32 connection with invalid trojan header from 172.69.34.172:51768 | failed to read hash | repeated salt detected
[WARN] 2021/03/10 10:55:32 redirecting connection from 172.69.34.172:51768 to 127.0.0.1:80
[ERROR] 2021/03/10 10:55:32 github.com/p4gefau1t/trojan-go/redirector.(*Redirector).worker.func1:redirector.go:73 failed to redirect | readfrom tcp 127.0.0.1:50448->127.0.0.1:80: cipher: message authentication failed
[INFO] 2021/03/10 10:55:32 redirection done
[INFO] 2021/03/10 10:55:32 tcp connection from 172.69.34.172:52952
[INFO] 2021/03/10 10:55:32 tls connection from 172.69.34.172:52952
[WARN] 2021/03/10 10:55:33 connection with invalid trojan header from 172.69.34.172:52952 | failed to read hash | repeated salt detected
[WARN] 2021/03/10 10:55:33 redirecting connection from 172.69.34.172:52952 to 127.0.0.1:80
[ERROR] 2021/03/10 10:55:33 github.com/p4gefau1t/trojan-go/redirector.(*Redirector).worker.func1:redirector.go:73 failed to redirect | readfrom tcp 127.0.0.1:50450->127.0.0.1:80: cipher: message authentication failed
[INFO] 2021/03/10 10:55:33 redirection done
[INFO] 2021/03/10 10:55:33 tcp connection from 172.69.34.172:54510
[INFO] 2021/03/10 10:55:33 tls connection from 172.69.34.172:54510
[WARN] 2021/03/10 10:55:34 connection with invalid trojan header from 172.69.34.172:54510 | failed to read hash | repeated salt detected
[WARN] 2021/03/10 10:55:34 redirecting connection from 172.69.34.172:54510 to 127.0.0.1:80
[ERROR] 2021/03/10 10:55:34 github.com/p4gefau1t/trojan-go/redirector.(*Redirector).worker.func1:redirector.go:73 failed to redirect | readfrom tcp 127.0.0.1:50452->127.0.0.1:80: cipher: message authentication failed

客户端日志
[INFO] 2021/03/10 10:55:18 trojan-go Custom Version initializing
[INFO] 2021/03/10 10:55:18 adapter listening on tcp/udp: [::]:1080
[INFO] 2021/03/10 10:55:18 cert is unspecified, using default ca list
[INFO] 2021/03/10 10:55:18 router client created
[INFO] 2021/03/10 10:55:30 socks connection from 127.0.0.1:54720 metadata news.google.com:443
[INFO] 2021/03/10 10:55:30 socks connection from 127.0.0.1:54724 metadata news.google.com:443
[INFO] 2021/03/10 10:55:32 socks connection from 127.0.0.1:54730 metadata news.google.com:443
[INFO] 2021/03/10 10:55:32 socks connection from 127.0.0.1:54729 metadata news.google.com:443
[INFO] 2021/03/10 10:55:32 connection to MUX_CONN:0 closed sent: 737 B recv: 0 B
[INFO] 2021/03/10 10:55:32 connection to MUX_CONN:0 closed sent: 1.06 KiB recv: 0 B
[ERROR] 2021/03/10 10:55:32 github.com/p4gefau1t/trojan-go/proxy.(*Proxy).relayConnLoop.func1.1:proxy.go:66 proxy failed to dial connection | simplesocks failed to dial using underlying tunnel | mux failed to open stream from client | EOF
[INFO] 2021/03/10 10:55:32 socks connection from 127.0.0.1:54733 metadata news.google.com:443
[INFO] 2021/03/10 10:55:33 socks connection from 127.0.0.1:54735 metadata news.google.com:443
[INFO] 2021/03/10 10:55:33 connection to MUX_CONN:0 closed sent: 782 B recv: 0 B
[INFO] 2021/03/10 10:55:33 connection to MUX_CONN:0 closed sent: 985 B recv: 0 B
[ERROR] 2021/03/10 10:55:33 github.com/p4gefau1t/trojan-go/proxy.(*Proxy).relayConnLoop.func1.1:proxy.go:66 proxy failed to dial connection | simplesocks failed to dial using underlying tunnel | mux failed to open stream from client | EOF
[INFO] 2021/03/10 10:55:33 socks connection from 127.0.0.1:54737 metadata news.google.com:443
[INFO] 2021/03/10 10:55:33 socks connection from 127.0.0.1:54740 metadata news.google.com:443
[INFO] 2021/03/10 10:55:33 connection to MUX_CONN:0 closed sent: 71 B recv: 0 B
[INFO] 2021/03/10 10:55:33 connection to MUX_CONN:0 closed sent: 98 B recv: 0 B
[ERROR] 2021/03/10 10:55:33 github.com/p4gefau1t/trojan-go/proxy.(*Proxy).relayConnLoop.func1.1:proxy.go:66 proxy failed to dial connection | simplesocks failed to dial using underlying tunnel | mux failed to open stream from client | EOF
[INFO] 2021/03/10 10:55:34 socks connection from 127.0.0.1:54742 metadata news.google.com:443
[INFO] 2021/03/10 10:55:35 socks connection from 127.0.0.1:54745 metadata news.google.com:443
[INFO] 2021/03/10 10:55:35 connection to MUX_CONN:0 closed sent: 331 B recv: 0 B
[INFO] 2021/03/10 10:55:35 connection to MUX_CONN:0 closed sent: 375 B recv: 0 B
[ERROR] 2021/03/10 10:55:35 github.com/p4gefau1t/trojan-go/proxy.(*Proxy).relayConnLoop.func1.1:proxy.go:66 proxy failed to dial connection | simplesocks failed to dial using underlying tunnel | mux failed to open stream from client | EOF

服务端和客户端配置文件

服务端配置:
{
"run_type": "server",
"local_addr": "0.0.0.0",
"local_port": 8443,
"remote_addr": "127.0.0.1",
"remote_port": 80,
"log_level": 1,
"log_file": "",
"password": [
""
],
"disable_http_check": false,
"udp_timeout": 60,
"ssl": {
"verify": true,
"verify_hostname": true,
"cert": "/usr/src/trojan-go-cert/fullchain.crt",
"key": "/usr/src/trojan-go-cert/private.key",
"key_password": "",
"cipher": "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384",
"cipher_tls13": "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384",
"curves": "",
"prefer_server_cipher": true,
"sni": "",
"alpn": [
"http/1.1"
],
"alpn_port_override": {
"h2": 81
},
"session_ticket": true,
"reuse_session": true,
"plain_http_response": "",
"fallback_addr": "127.0.0.1",
"fallback_port": 80,
"fingerprint": "firefox"
},
"tcp": {
"no_delay": true,
"keep_alive": true,
"prefer_ipv4": false
},
"mux": {
"enabled": true,
"concurrency": 8,
"idle_timeout": 60
},
"router": {
"enabled": false,
"bypass": [

],
"proxy": [

],
"block": [

],
"default_policy": "proxy",
"domain_strategy": "as_is",
"geoip": "$PROGRAM_DIR$/geoip.dat",
"geosite": "$PROGRAM_DIR$/geosite.dat"

},
"websocket": {
"enabled": true,
"path": "/apps",
"host": ""
},
"shadowsocks": {
"enabled": true,
"method": "AES-128-GCM",
"password": ""
},
"transport_plugin": {
"enabled": false,
"type": "",
"command": "",
"option": "",
"arg": [

],
"env": [

]

},
"forward_proxy": {
"enabled": false,
"proxy_addr": "",
"proxy_port": 0,
"username": "",
"password": ""
},
"mysql": {
"enabled": false,
"server_addr": "localhost",
"server_port": 3306,
"database": "",
"username": "",
"password": "",
"check_rate": 60
},
"api": {
"enabled": false,
"api_addr": "",
"api_port": 0,
"ssl": {
"enabled": false,
"key": "",
"cert": "",
"verify_client": false,
"client_cert": [

  ]
}

}
}

客户端配置
run-type: client
local-addr: "::"
local-port: 1080
remote-addr:
remote-port: 8443
password:

ssl:
sni:
mux:
enabled: true
websocket:
enabled: true
path: "/apps"
host:
shadowsocks:
enabled: true
method: AES-128-GCM
password:
router:
enabled: true
#bypass: ['geoip:cn', 'geoip:private', 'geosite:cn', 'geosite:geolocation-cn']
#block: ['geosite:category-ads']
#proxy: ['geosite:geolocation-!cn']
#default_policy: proxy
#geoip: ./geoip.dat
#geosite: ./geosite.dat

服务端和客户端版本信息

请执行./trojan-go -version并将输出完整粘贴在此处

客户端
Trojan-Go v0.8.2-27-gfd129c2
Go Version: go1.15.4
OS/Arch: linux/amd64
Git Commit: fd129c2

Developed by PageFault (p4gefau1t)
Licensed under GNU General Public License version 3
GitHub Repository: https://github.com/p4gefau1t/trojan-go
Trojan-Go Documents: https://p4gefau1t.github.io/trojan-go/
服务端
Trojan-Go v0.8.2-27-gfd129c2
Go Version: go1.15.5
OS/Arch: linux/amd64
Git Commit: fd129c2

Developed by PageFault (p4gefau1t)
Licensed under GNU General Public License version 3
GitHub Repository: https://github.com/p4gefau1t/trojan-go
Trojan-Go Documents: https://p4gefau1t.github.io/trojan-go/

其他信息

你认为对我们修复bug有帮助的任何信息都可以在这里写出来

@mzz2017
Copy link

mzz2017 commented Apr 29, 2021

我正在将 trojan-go 引入 v2rayA ,我已复现该问题。

@Loyalsoldier
Copy link
Collaborator

麻烦试一试这个 PR:#312

@mzz2017
Copy link

mzz2017 commented Apr 29, 2021

麻烦试一试这个 PR:#312

它在我这里工作良好,看起来已经被修复了,谢谢。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants