mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-06 05:17:38 +03:00
Shadowsocks 2022 protocol change
This commit is contained in:
parent
7d06e20837
commit
04cd76f0aa
11 changed files with 294 additions and 115 deletions
|
@ -50,14 +50,9 @@ func From(data []byte) *Buffer {
|
|||
}
|
||||
|
||||
func As(data []byte) *Buffer {
|
||||
size := len(data)
|
||||
max := cap(data)
|
||||
if size != max {
|
||||
data = data[:max]
|
||||
}
|
||||
return &Buffer{
|
||||
data: data,
|
||||
end: size,
|
||||
end: len(data),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue