mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 01:15:41 +08:00
parent
e3f7555032
commit
40f75ef38b
@ -89,7 +89,7 @@ func (r *aeadReader) read(p []byte) (int, error) {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
if int(size) > len(p) {
|
||||
if int(size) <= r.Overhead() || int(size) > len(p) {
|
||||
return 0, io.EOF
|
||||
}
|
||||
|
||||
@ -111,8 +111,6 @@ func (r *aeadReader) read(p []byte) (int, error) {
|
||||
|
||||
func (r *aeadReader) Read(p []byte) (int, error) {
|
||||
if r.buf == nil {
|
||||
// https://www.v2fly.org/en_US/developer/protocols/vmess.html#standard-format
|
||||
// According to the spec, the maximum data length is 2^14 (chunkSize)
|
||||
if len(p) >= chunkSize {
|
||||
return r.read(p)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user