mirror of
https://github.com/snail007/goproxy.git
synced 2026-04-27 00:15:51 +03:00
[GH-ISSUE #519] 我在使用贵项目做http代理时,中间使用tcp协议可以通,但是使用kcp协议就失败了,提示decoder err,我想解决这个问题。 #421
Labels
No labels
TODO
bug
duplicate
enhancement
good first issue
help wanted
helpful
invalid
need-confirm
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/goproxy#421
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jzbg on GitHub (Jan 10, 2023).
Original GitHub issue: https://github.com/snail007/goproxy/issues/519
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)
Detailed Description
通过kcp协议代理http,代理失败,提示http decoder err
Possible Implementation
无法推测原因
@snail007 commented on GitHub (Jan 10, 2023):
fixed in v12.4 latest release, update:
proxy update -f@jzbg commented on GitHub (Jan 11, 2023):
发现v12.4 版本kcp在socket5中使用时有问题,无法支撑ftp传输。