Closed oif closed 4 years ago
@riobard re-implement saltfilter and support change filter entries and FPS via ldflags
(but saltfilter slot count fixed). And wait https://github.com/riobard/go-bloom/pull/1 merged to modify go.mod
pardon me, I should post the general purpose of this PR.
saltfilter
package and expose necessary function(Check
and Test
);Please make salfilter
an internal package. I don't want to export any of its members to avoid outside use.
@riobard How about create a github.com/shadowsocks/go-shadowsocks2/internal
package and put filter inside?
I guess that's the way to do it.
and also suppose public errors like var ErrShortPacket = errors.New("short packet")
should define in one place(maybe internal
or errors
)
What do you mean? It's already exported.
errors declared both in aead and steam package, it’s not necessary and hard to handle outside as well
We will remove shadowstream package soon (I've already removed it from my fork), so there's no need to worry about that.
@riobard OK, then just keep those declaration
We should add the necessary documentation.
@riobard yep, I'll create a new PR about this soon.
Use bloom filter to withstand reuse 'attack'.
Same implementation as https://github.com/shadowsocks/shadowsocks-libev/blob/v3.3.4/src/ppbloom.c