mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-27 04:25:44 -05:00
support aggressive mode in auth reader
This commit is contained in:
@@ -158,8 +158,14 @@ func (v *AuthenticationReader) Read(b []byte) (int, error) {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
nBytes := v.CopyChunk(b)
|
||||
return nBytes, nil
|
||||
totalBytes := v.CopyChunk(b)
|
||||
for v.aggressive {
|
||||
if err := v.NextChunk(); err != nil {
|
||||
break
|
||||
}
|
||||
totalBytes += v.CopyChunk(b[totalBytes:])
|
||||
}
|
||||
return totalBytes, nil
|
||||
}
|
||||
|
||||
type AuthenticationWriter struct {
|
||||
|
||||
Reference in New Issue
Block a user