Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

我在使用贵项目做http代理时,中间使用tcp协议可以通,但是使用kcp协议就失败了,提示decoder err,我想解决这个问题。 #519

Open
jzbg opened this issue Jan 10, 2023 · 2 comments

Comments

@jzbg
Copy link

jzbg commented Jan 10, 2023

Expected Behavior

我在使用贵项目做http代理时,中间使用tcp协议可以通,但是使用kcp协议就失败了,提示decoder err,我想解决这个问题。

Current Behavior

一级代理日志如下,提示 released [192.168.1.32:80]
C:\Users\Administrator\Desktop\proxy-windows-amd64>proxy http -t kcp -p "0.0.0.0
:38080" --kcp-key mypassword
2023/01/10 09:58:14.251976 INFO kcp http(s) proxy on 0.0.0.0:38080
2023/01/10 10:00:20.676777 INFO GET:http://192.168.1.32/?user/login.html
2023/01/10 10:00:20.676777 INFO use parent : false, 192.168.1.32:80
2023/01/10 10:00:20.677777 INFO conn 192.168.1.31:65084 - 0.0.0.0:38080 <-> 192.
168.1.32:53461 - 192.168.1.32:80 connected [192.168.1.32:80]
2023/01/10 10:00:20.697777 INFO conn 192.168.1.31:65084 - 0.0.0.0:38080 <-> 192.
168.1.32:53461- 192.168.1.32:80 released [192.168.1.32:80]
2023/01/10 10:00:23.409177 INFO CONNECT:sug.so.360.cn:443
2023/01/10 10:00:23.409177 INFO use parent : false, sug.so.360.cn:443
2023/01/10 10:00:25.798377 INFO CONNECT:sug.so.360.cn:443
2023/01/10 10:00:25.798377 INFO use parent : false, sug.so.360.cn:443
2023/01/10 10:00:26.161377 INFO GET:http://192.168.1.112/
2023/01/10 10:00:26.161377 INFO use parent : false, 192.168.1.112:80
2023/01/10 10:00:26.163377 INFO conn 192.168.1.31:65087 - 0.0.0.0:38080 <-> 192.
168.1.32:53462 - 192.168.1.112:80 connected [192.168.1.112:80]
2023/01/10 10:00:26.189377 INFO conn 192.168.1.31:65087 - 0.0.0.0:38080 <-> 192.
168.1.32:53462- 192.168.1.112:80 released [192.168.1.112:80]

二级代理日志如下,提示http decoder read err:
C:\Users\Administrator\Desktop\proxy-windows-amd64>proxy http -t tcp -p "0.0.0.0
:8083" -T kcp -P "192.168.1.32:38080" --kcp-key mypassword
2022/01/10 09:59:30.986955 INFO use kcp parent [192.168.1.32:38080] [ ROUNDROBIN
]
2022/01/10 09:59:31.009555 INFO tcp http(s) proxy on [::]:8083
2022/01/10 10:00:22.503755 INFO GET:http://192.168.1.32/?user/login.html
2022/01/10 10:00:22.503755 INFO use parent : true, 192.168.1.32:80
2022/01/10 10:00:22.503755 INFO conn 192.168.1.111:59477 - 192.168.1.31:8083 <->
0.0.0.0:65084 - 192.168.1.32:38080 connected [192.168.1.32:80]
2022/01/10 10:00:23.503955 WARN decoder error , from 192.168.1.111:59478, ERR:ht
tp decoder read err: http decoder read err: read tcp 192.168.1.31:8083->192.168.
1.111:59478: i/o timeout
2022/01/10 10:00:25.285955 INFO CONNECT:sug.so.360.cn:443
2022/01/10 10:00:25.285955 INFO use parent : true, sug.so.360.cn:443
2022/01/10 10:00:25.286955 INFO conn 192.168.1.111:59481 - 192.168.1.31:8083 <->
0.0.0.0:65085 - 192.168.1.32:38080 connected [sug.so.360.cn:443]
2022/01/10 10:00:27.668955 INFO CONNECT:sug.so.360.cn:443
2022/01/10 10:00:27.669955 INFO use parent : true, sug.so.360.cn:443
2022/01/10 10:00:27.669955 INFO conn 192.168.1.111:59484 - 192.168.1.31:8083 <->
0.0.0.0:65086 - 192.168.1.32:38080 connected [sug.so.360.cn:443]
2022/01/10 10:00:28.001955 INFO GET:http://192.168.1.112/
2022/01/10 10:00:28.001955 INFO use parent : true, 192.168.1.112:80
2022/01/10 10:00:28.002955 INFO conn 192.168.1.111:59485 - 192.168.1.31:8083 <->
0.0.0.0:65087 - 192.168.1.32:38080 connected [192.168.1.112:80]
2022/01/10 10:00:28.995955 WARN decoder error , from 192.168.1.111:59486, ERR:ht
tp decoder read err: http decoder read err: read tcp 192.168.1.31:8083->192.168.
1.111:59486: i/o timeout

Possible Solution

Steps to Reproduce

首先启动一级代理
然后启动二级代理
浏览器设置代理
发现问题,代理失败

Context (Environment)

  1. proxy version is : 12.3
  2. full command is :proxy http -t tcp -p "0.0.0.0:8083" -T kcp -P "192.168.1.32:38080" --kcp-key mypassword
  3. proxy http -t kcp -p "0.0.0.0:38080" --kcp-key mypassword
  4. system is :win7
  5. full log is: 上边已提交
  6. 浏览器用的360极速浏览器21.0.1180

Detailed Description

通过kcp协议代理http,代理失败,提示http decoder err

Possible Implementation

无法推测原因

@snail007
Copy link
Owner

fixed in v12.4 latest release, update: proxy update -f

@jzbg
Copy link
Author

jzbg commented Jan 11, 2023

fixed in v12.4 latest release, update: proxy update -f

发现v12.4 版本kcp在socket5中使用时有问题,无法支撑ftp传输。

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

No branches or pull requests

2 participants