feat: add support for shadowsocks 2022 ciphers

This commit is contained in:
世界
2022-06-06 19:52:02 +08:00
parent e995003c27
commit 1acc6759e9
5 changed files with 35 additions and 18 deletions

View File

@ -8,7 +8,7 @@ import (
"sync"
)
var defaultAllocator = NewAllocator()
var DefaultAllocator = NewAllocator()
// Allocator for incoming frames, optimized to prevent overwriting after zeroing
type Allocator struct {

View File

@ -13,9 +13,9 @@ const (
)
func Get(size int) []byte {
return defaultAllocator.Get(size)
return DefaultAllocator.Get(size)
}
func Put(buf []byte) error {
return defaultAllocator.Put(buf)
return DefaultAllocator.Put(buf)
}