mritd / dockerfile

some personally made dockerfile
https://hub.docker.com/u/mritd
MIT License
2.07k stars 647 forks source link

使用Docker镜像跑 SS KCPTUN 客户端已成功,却无法科学 #40

Closed soulmz closed 6 years ago

soulmz commented 6 years ago

docker run -dt --name ssclient -p 1080:1080 -p 6500:6500/udp mritd/shadowsocks -m "ss-local" -s "-s 127.0.0.1 -p 6500 -b 0.0.0.0 -l 1080 -m aes-256-cfb -k test123 --fast-open" -x -e "kcpclient" -k "-r SERVERIP:6500 -l :6500 -mode fast2"

服务端和测试端,都使用的是这个例子给的。

image

客户端Docker 日志信息

Starting kcptun......
Starting shadowsocks......
 2018-01-23 18:52:44 INFO: using tcp fast open
 2018-01-23 18:52:44 INFO: initializing ciphers... aes-256-cfb
 2018-01-23 18:52:44 INFO: listening at 0.0.0.0:1080
 2018-01-23 18:52:44 INFO: running from root user
2018/01/23 18:52:44 version: 20171201
2018/01/23 18:52:44 listening on: [::]:6500
2018/01/23 18:52:44 encryption: aes
2018/01/23 18:52:44 nodelay parameters: 1 20 2 1
2018/01/23 18:52:44 remote address: SERVERIP:6500
2018/01/23 18:52:44 sndwnd: 128 rcvwnd: 512
2018/01/23 18:52:44 compression: true
2018/01/23 18:52:44 mtu: 1350
2018/01/23 18:52:44 datashard: 10 parityshard: 3
2018/01/23 18:52:44 acknodelay: false
2018/01/23 18:52:44 dscp: 0
2018/01/23 18:52:44 sockbuf: 4194304
2018/01/23 18:52:44 keepalive: 10
2018/01/23 18:52:44 conn: 1
2018/01/23 18:52:44 autoexpire: 0
2018/01/23 18:52:44 scavengettl: 600
2018/01/23 18:52:44 snmplog:
2018/01/23 18:52:44 snmpperiod: 60
2018/01/23 18:52:44 quiet: false
2018/01/23 18:52:44 connection: 172.17.0.2:45486 -> SERVERIP:6500

服务端Docker 日志信息

Starting kcptun......
Starting shadowsocks......
 2018-01-23 17:59:12 INFO: using tcp fast open
 2018-01-23 17:59:12 INFO: initializing ciphers... aes-256-cfb
 2018-01-23 17:59:12 INFO: tcp server listening at 0.0.0.0:6443
 2018-01-23 17:59:12 INFO: running from root user
2018/01/23 17:59:12 version: 20171201
2018/01/23 17:59:12 listening on: [::]:6500
2018/01/23 17:59:12 target: 127.0.0.1:6443
2018/01/23 17:59:12 encryption: aes
2018/01/23 17:59:12 nodelay parameters: 1 20 2 1
2018/01/23 17:59:12 sndwnd: 1024 rcvwnd: 1024
2018/01/23 17:59:12 compression: true
2018/01/23 17:59:12 mtu: 1350
2018/01/23 17:59:12 datashard: 10 parityshard: 3
2018/01/23 17:59:12 acknodelay: false
2018/01/23 17:59:12 dscp: 0
2018/01/23 17:59:12 sockbuf: 4194304
2018/01/23 17:59:12 keepalive: 10
2018/01/23 17:59:12 snmplog:
2018/01/23 17:59:12 snmpperiod: 60
2018/01/23 17:59:12 pprof: false
2018/01/23 17:59:12 quiet: false

使用SS 客户端连上后,依然无法科学上网

mritd commented 6 years ago

已测试,无问题 请认证阅读文档,服务端请使用服务端参数,IP 请替换自己服务器 ip,谢谢

soulmz commented 6 years ago

@mritd 可以给出你的测试用例吗?

我这边使用 ShadowsocksX-NG 客户端链接,依然无法连

JsonSong89 commented 6 years ago

@zhangmz0223 我遇到跟你一样的问题了,也是卡在quiet: false 这行下不去,kcp连不上.

mritd commented 6 years ago

我测试并未使用 桌面客户端,因为桌面客户端集成的 kcp 版本不统一,维护也不一定及时,我测试直接在 linux 启动了一个 docker 版本的 client 模式,然后 浏览器插件直连过去

JsonSong89 commented 6 years ago

@mritd 我是没有管client,直接运行readme上的

docker run -dt --name ssserver -p 6443:6443 -p 6500:6500/udp mritd/shadowsocks -m "ss-server" -s "-s 0.0.0.0 -p 6443 -m chacha20 -k jsonsong --fast-open" -x -e "kcpserver" -k "-t 127.0.0.1:6443 -l :6500 -mode fast2 " 除了改了个密码,其他都没动,也是卡住,两个vps都卡.

mritd commented 6 years ago

@JsonSong89 刚刚又测试一遍,确认没问题

# Server
docker run -dt --name ssserver -p 153:6443 -p 154:6500/udp mritd/shadowsocks -m "ss-server" -s "-s 0.0.0.0 -p 6443 -m chacha20 -k jsonsong --fast-open" -x -e "kcpserver" -k "-t 127.0.0.1:6443 -l :6500 -mode fast2"

# Client
docker run --rm -it -p 1080:1080 mritd/shadowsocks -m "ss-local" -s "-s 127.0.0.1 -p 6500 -b 0.0.0.0 -l 1080 -m chacha20 -k jsonsong --fast-open" -x -e "kcpclient" -k "-r 服务器地址:154 -l :6500 -mode fast2"

两台 linux server 链接,本地使用浏览器插件设置 socks5 代理测试成功;后续使用 shadowsocks-NG 测试发现 kcptun 模式下无连接,不清楚他的 kcp 客户端版本,不过我在 github 上看到他的最后一个 release 日期是 2月6号,而当前镜像的 kcp 已经更新到了 20180810,可能由于 NG 版本太低已经出现了不兼容

mritd commented 6 years ago

刚刚看了下 NG 客户端最新的代码里面 kcptun 还是很老的版本
image