Acris / docker-shadowsocks-libev

Build a docker image for shadowsocks-libev with v2ray-plugin, based on Alpine Linux.
https://hub.docker.com/r/acrisliu/shadowsocks-libev/
MIT License
303 stars 96 forks source link

Connection doesn't allow setting of receive buffer size. #28

Closed ayton closed 2 years ago

ayton commented 2 years ago

After starting your docker with quic i get the error...

connection doesn't allow setting of receive buffer size. Not a *net.UDPConn?. See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.

How can I fix this? Thanks...

Acris commented 2 years ago

Can you attach a full log about this error?

ayton commented 2 years ago

docker logs root@:~# docker logs shadowsocks-libev 2022-01-26 03:19:33 INFO: enable TCP no-delay 2022-01-26 03:19:33 INFO: plugin "v2ray-plugin" enabled 2022-01-26 03:19:33 INFO: enable TCP no-delay 2022-01-26 03:19:33 INFO: initializing ciphers... chacha20-ietf-poly1305 2022-01-26 03:19:33 INFO: using nameserver: 1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001 2022-01-26 03:19:33 INFO: tcp server listening at 127.0.0.1:52465 2022-01-26 03:19:33 INFO: tcp port reuse enabled 2022-01-26 03:19:33 INFO: running from root user 2022/01/26 03:19:33 V2Ray 4.43.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.17.3 linux/amd64) 2022/01/26 03:19:33 A unified platform for anti-censorship. 2022/01/26 03:19:33 connection doesn't allow setting of receive buffer size. Not a *net.UDPConn?. See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details. 2022/01/26 03:19:33 [Warning] V2Ray 4.43.0 started

ayton commented 2 years ago

I tried to make changes according to the wiki, but it did not help me to fix the error.

Acris commented 2 years ago

Hi, Please pull the latest docker image and try again.

ayton commented 2 years ago

same problem...

root@:~# docker logs shadowsocks-libev 2022-01-26 08:23:26 INFO: enable TCP no-delay 2022-01-26 08:23:26 INFO: plugin "v2ray-plugin" enabled 2022-01-26 08:23:26 INFO: enable TCP no-delay 2022-01-26 08:23:26 INFO: initializing ciphers... chacha20-ietf-poly1305 2022-01-26 08:23:26 INFO: using nameserver: 1.1.1.1,1.0.0.1,2606:4700:4700::1111,2606:4700:4700::1001 2022-01-26 08:23:26 INFO: tcp server listening at 127.0.0.1:37517 2022-01-26 08:23:26 INFO: tcp port reuse enabled 2022-01-26 08:23:26 INFO: running from root user 2022/01/26 08:23:26 V2Ray 4.44.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.17.6 linux/amd64) 2022/01/26 08:23:26 A unified platform for anti-censorship. 2022/01/26 08:23:26 connection doesn't allow setting of receive buffer size. Not a *net.UDPConn?. See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details. 2022/01/26 08:23:26 [Warning] V2Ray 4.44.0 started

Acris commented 2 years ago

This issue comes from v2ray-core and should be fixed in https://github.com/v2fly/v2ray-core/pull/1404, this fix should also be included in v4.44.0, but strangely after I upgraded v2ray-core to the latest release, the issue still exists.

v2ray-core v5 is in pre-release and there are also some pre-release versions of v2ray-plugin: https://github.com/teddysun/v2ray-plugin, maybe we should test with the v5 version later.

ayton commented 2 years ago

Thanks for the quick response. Let's wait v5 version

Acris commented 2 years ago

Hi @ayton ,

Since v2ray-plugin v5 is still not released, now you can use acrisliu/shadowsocks-libev:nightly tag for QUIC mode.

Before this, you need to increase the maximum buffer size on your host machine by running:

sysctl -w net.core.rmem_max=2500000

Then you can start ss-server in QUIC mode with v2ray-plugin, which worked for me.