openresty / openresty/stream-lua-nginx-module
Why is the preread method in the stream subsystem called after receiving at least 5 bytes?
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 749
- Forks
- 210
- Avg merge
- 4h 31m
- Merged PRs (30d)
- 3
Description
Hello Dears,
Could anyone help me? I test it with a TCP client. the preread method is not called until the fifth byte is sent. Why?
The interactive message information is as follows

I hope to intercept the IP of the client when establishing TCP connection. Is the method I use wrong?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the stream subsystem's preread method and reproduce the behavior with the TCP client described in the issue. Determine why the method waits for at least five bytes, then document whether the client IP can be intercepted when the TCP connection is established and whether this usage is supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, lua, nginx
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100