Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read any data when protocol set to origin #9

Open
CuberL opened this issue Jul 2, 2021 · 0 comments
Open

Can't read any data when protocol set to origin #9

CuberL opened this issue Jul 2, 2021 · 0 comments

Comments

@CuberL
Copy link

CuberL commented Jul 2, 2021

I just working on a SSR speed test project base on your library. But I found that when I set protocol to origin, I can't read any data from server side. After checking your code, I found a line may cause that problem

shadowsocksR/tcp.go

Lines 180 to 186 in b0d026c

postDecryptedData, length, err := c.IProtocol.PostDecrypt(encryptbuf)
if err != nil {
return 0, err
}
if length == 0 {
c.readEncryptBuf.Write(encryptbuf)
return 0, nil

It return nothing when PostDecrypt return length = 0. I removed line 186 in local and it works. Can check if it is a bug. Thx for your awesome library. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant