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

在境外服务器上部署ss,延迟200+,期望使用kcptun来加速,本地服务器无法curl --socks5 127.0.0.1:8388 http://baidu.com #962

Open
v-49 opened this issue Aug 5, 2024 · 5 comments

Comments

@v-49
Copy link

v-49 commented Aug 5, 2024

境外服务器:
ss配置8488
配置kcptun 服务器端

admin 1140348 0.0 2.4 1244524 18648 pts/0 Sl 15:01 0:00 ./server_linux_amd64 -t 127.0.0.1:8488 -l :4000 -mode fast2

本地服务器
配置kcptun 客户端

root 2878465 0.0 0.3 1245056 21568 pts/4 Sl 14:02 0:01 ./client_linux_arm64 -r 47.236.112.68:4000 -l :8388 -mode fast2

关闭防火墙开放端口

远程日志:

2024/08/05 14:52:25 tcp.go:87: proxy 127.0.0.1:36626 <-> XXX:8488 <-> 110.242.68.66:80
2024/08/05 14:57:30 tcp.go:87: proxy 127.0.0.1:36652 <-> XXX:8488 <-> 39.156.66.10:80
2024/08/05 15:01:19 version: 20240730
2024/08/05 15:01:19 smux version: 1
2024/08/05 15:01:19 listening on: :4000
2024/08/05 15:01:19 target: 127.0.0.1:8488
2024/08/05 15:01:19 encryption: aes
2024/08/05 15:01:19 nodelay parameters: 1 20 2 1
2024/08/05 15:01:19 sndwnd: 1024 rcvwnd: 1024
2024/08/05 15:01:19 compression: true
2024/08/05 15:01:19 mtu: 1350
2024/08/05 15:01:19 datashard: 10 parityshard: 3
2024/08/05 15:01:19 acknodelay: false
2024/08/05 15:01:19 dscp: 0
2024/08/05 15:01:19 sockbuf: 4194304
2024/08/05 15:01:19 smuxbuf: 4194304
2024/08/05 15:01:19 streambuf: 2097152
2024/08/05 15:01:19 keepalive: 10
2024/08/05 15:01:19 snmplog:
2024/08/05 15:01:19 snmpperiod: 60
2024/08/05 15:01:19 pprof: false
2024/08/05 15:01:19 quiet: false
2024/08/05 15:01:19 tcp: false
2024/08/05 15:01:19 initiating key derivation
2024/08/05 15:01:19 key derivation done
2024/08/05 15:01:19 Listening on: :4000/udp

本地服务器日志:

2024/08/05 14:02:09 version: 20240730
2024/08/05 14:02:09 smux version: 1
2024/08/05 14:02:09 listening on: [::]:8388
2024/08/05 14:02:09 encryption: aes
2024/08/05 14:02:09 QPP: false
2024/08/05 14:02:09 QPP Count: 61
2024/08/05 14:02:09 nodelay parameters: 1 20 2 1
2024/08/05 14:02:09 remote address: XXX:4000
2024/08/05 14:02:09 sndwnd: 128 rcvwnd: 512
2024/08/05 14:02:09 compression: true
2024/08/05 14:02:09 mtu: 1350
2024/08/05 14:02:09 datashard: 10 parityshard: 3
2024/08/05 14:02:09 acknodelay: false
2024/08/05 14:02:09 dscp: 0
2024/08/05 14:02:09 sockbuf: 4194304
2024/08/05 14:02:09 smuxbuf: 4194304
2024/08/05 14:02:09 streambuf: 2097152
2024/08/05 14:02:09 keepalive: 10
2024/08/05 14:02:09 conn: 1
2024/08/05 14:02:09 autoexpire: 0
2024/08/05 14:02:09 scavengettl: 600
2024/08/05 14:02:09 snmplog:
2024/08/05 14:02:09 snmpperiod: 60
2024/08/05 14:02:09 quiet: false
2024/08/05 14:02:09 tcp: false
2024/08/05 14:02:09 pprof: false
2024/08/05 14:02:09 initiating key derivation
2024/08/05 14:02:09 key derivation done

远程可以 curl --socks5 127.0.0.1:8388 http://baidu.com 本地不行 curl --socks5 127.0.0.1:8388 http://baidu.com
curl --socks5 127.0.0.1:8388 http://baidu.com
curl: (7) Unable to receive initial SOCKS5 response.

问gpt日志分析说几秒钟就断了
image

我也不是很懂哪里出了问题 不知道是不是少配置了什么参数 希望大佬帮忙看看

@xtaci
Copy link
Owner

xtaci commented Aug 5, 2024

target: 127.0.0.1:8488 是socks5 protocol?

@v-49
Copy link
Author

v-49 commented Aug 13, 2024

target: 127.0.0.1:8488 是socks5 protocol?

这是什么意思 不太明白

@egg1234
Copy link

egg1234 commented Aug 29, 2024

@v-49 因为kcptun只能做端口转发不能处理任何代理协议,它把你本地curl命令对8388端口的请求转发到服务器端的8488端口,而你说服务器端的8488端口架了一个ss服务,正常来说ss服务的inbound入口只能接受ss的协议,和socks5协议没有关系,所以你在客户端用curl命令请求8388端口的socks5代理,那这个请求被kcptun转发到服务器端的8488端口的ss,谁能够处理socsk5的请求呢?

@v-49
Copy link
Author

v-49 commented Sep 2, 2024

@v-49 因为kcptun只能做端口转发不能处理任何代理协议,它把你本地curl命令对8388端口的请求转发到服务器端的8488端口,而你说服务器端的8488端口架了一个ss服务,正常来说ss服务的inbound入口只能接受ss的协议,和socks5协议没有关系,所以你在客户端用curl命令请求8388端口的socks5代理,那这个请求被kcptun转发到服务器端的8488端口的ss,谁能够处理socsk5的请求呢?
明白了,谢谢大佬

@maojianyou
Copy link

境外服务器: ss配置8488 配置kcptun 服务器端

admin 1140348 0.0 2.4 1244524 18648 pts/0 Sl 15:01 0:00 ./server_linux_amd64 -t 127.0.0.1:8488 -l :4000 -mode fast2

本地服务器 配置kcptun 客户端

root 2878465 0.0 0.3 1245056 21568 pts/4 Sl 14:02 0:01 ./client_linux_arm64 -r 47.236.112.68:4000 -l :8388 -mode fast2

关闭防火墙开放端口

远程日志:

2024/08/05 14:52:25 tcp.go:87: proxy 127.0.0.1:36626 <-> XXX:8488 <-> 110.242.68.66:80 2024/08/05 14:57:30 tcp.go:87: proxy 127.0.0.1:36652 <-> XXX:8488 <-> 39.156.66.10:80 2024/08/05 15:01:19 version: 20240730 2024/08/05 15:01:19 smux version: 1 2024/08/05 15:01:19 listening on: :4000 2024/08/05 15:01:19 target: 127.0.0.1:8488 2024/08/05 15:01:19 encryption: aes 2024/08/05 15:01:19 nodelay parameters: 1 20 2 1 2024/08/05 15:01:19 sndwnd: 1024 rcvwnd: 1024 2024/08/05 15:01:19 compression: true 2024/08/05 15:01:19 mtu: 1350 2024/08/05 15:01:19 datashard: 10 parityshard: 3 2024/08/05 15:01:19 acknodelay: false 2024/08/05 15:01:19 dscp: 0 2024/08/05 15:01:19 sockbuf: 4194304 2024/08/05 15:01:19 smuxbuf: 4194304 2024/08/05 15:01:19 streambuf: 2097152 2024/08/05 15:01:19 keepalive: 10 2024/08/05 15:01:19 snmplog: 2024/08/05 15:01:19 snmpperiod: 60 2024/08/05 15:01:19 pprof: false 2024/08/05 15:01:19 quiet: false 2024/08/05 15:01:19 tcp: false 2024/08/05 15:01:19 initiating key derivation 2024/08/05 15:01:19 key derivation done 2024/08/05 15:01:19 Listening on: :4000/udp

本地服务器日志:

2024/08/05 14:02:09 version: 20240730 2024/08/05 14:02:09 smux version: 1 2024/08/05 14:02:09 listening on: [::]:8388 2024/08/05 14:02:09 encryption: aes 2024/08/05 14:02:09 QPP: false 2024/08/05 14:02:09 QPP Count: 61 2024/08/05 14:02:09 nodelay parameters: 1 20 2 1 2024/08/05 14:02:09 remote address: XXX:4000 2024/08/05 14:02:09 sndwnd: 128 rcvwnd: 512 2024/08/05 14:02:09 compression: true 2024/08/05 14:02:09 mtu: 1350 2024/08/05 14:02:09 datashard: 10 parityshard: 3 2024/08/05 14:02:09 acknodelay: false 2024/08/05 14:02:09 dscp: 0 2024/08/05 14:02:09 sockbuf: 4194304 2024/08/05 14:02:09 smuxbuf: 4194304 2024/08/05 14:02:09 streambuf: 2097152 2024/08/05 14:02:09 keepalive: 10 2024/08/05 14:02:09 conn: 1 2024/08/05 14:02:09 autoexpire: 0 2024/08/05 14:02:09 scavengettl: 600 2024/08/05 14:02:09 snmplog: 2024/08/05 14:02:09 snmpperiod: 60 2024/08/05 14:02:09 quiet: false 2024/08/05 14:02:09 tcp: false 2024/08/05 14:02:09 pprof: false 2024/08/05 14:02:09 initiating key derivation 2024/08/05 14:02:09 key derivation done

远程可以 curl --socks5 127.0.0.1:8388 http://baidu.com 本地不行 curl --socks5 127.0.0.1:8388 http://baidu.com curl --socks5 127.0.0.1:8388 http://baidu.com curl: (7) Unable to receive initial SOCKS5 response.

问gpt日志分析说几秒钟就断了 image

我也不是很懂哪里出了问题 不知道是不是少配置了什么参数 希望大佬帮忙看看

远程可以 curl --socks5 127.0.0.1:8388 http://baidu.com/ ??? 远程不是在服务端是8488吗? 是在阿里云服务器上面8388 不知道是什么逻辑

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

4 participants