shadowsocks / go-shadowsocks2

Modern Shadowsocks in Go
Apache License 2.0
4.45k stars 1.39k forks source link

Optimize memory usage with go-shadowsocks2 in bloomring for defense replay attack. #171

Closed chinsyo closed 4 years ago

chinsyo commented 4 years ago

Hi, go-shadowsocks2 is such a brilliant project that really inspired me.

15Mb memory limit on iOS platform is a big challenge, and I think the dependency go-shadowsocks2 bloomring module alloc about 1Mb memory to defense replay attack in client is a little bit luxurious.

Could you please change the bloomring feature to optional?

chinsyo commented 4 years ago

I mean add build flags for this feature, so project using go-shadowsocks2 as dependency needn't to modify the source code. :)

chinsyo commented 4 years ago

@riobard

riobard commented 4 years ago

The Bloom filter is optional, but you have to opt out by setting an environment variable. See README.

I'm curious how do you use go-ss2 on iOS?

chinsyo commented 4 years ago

I'm curious how do you use go-ss2 on iOS?

FYI. https://github.com/Jigsaw-Code/outline-go-tun2socks outline-ss-server in go.mod depends on go-shadowsocks2

https://github.com/eycorsican/go-tun2socks/tree/v1.16.0/proxy/shadowsocks

riobard commented 4 years ago

I see. Since you can opt out of Bloom filters, I assume this issue is now resolved. Feel free to reopen if there's anything else you have in mind.