-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat(ip-restriction): Add TCP Support #10245
Conversation
This PR is almost the same with #10229, What is the relation? |
We work on the same team. We need this feature in 2.8.x because we can't upgrade to v3 yet. |
Could you add some test cases for this PR? Thanks. |
Sure, but I'm completely lost on how testing works here. is this the test for this plugin : Also, is there some docs on how testing works? Thanks. |
This plugin's test should be |
Yeah, I found the tests right after I asked :-) I'm actually working on the other suggested changed ATM. |
…rn 1, Fix formatting
There's one remaining comment. I think I've resolved the issue, just waiting for feedback. |
Please add an entry to CHANGELOG.md. |
@bungle can you please approve changes you requested? Thank you. |
@hanshuebner @hbagdi |
Feedback has been addressed, ngx.exit is no longer used.
@scrudge Thank your for your contribution! |
Thank you for all your help.
…On Sat, Jul 8, 2023, 8:54 AM Hans Hübner ***@***.***> wrote:
@scrudge <https://github.com/scrudge> Thank your for your contribution!
—
Reply to this email directly, view it on GitHub
<#10245 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAS4RZRV36J36FL3EPKEGUTXPDYXZANCNFSM6AAAAAAUS4K6SQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Summary
This change adds TCP support to the ip-restriction plugin by implementing the Stream module's preread function.
When a TCP connection is rejected due to IP restriction rules, a JSON error response is written to the stream and the connection is closed.
Checklist
Full changelog
Issue reference
Fix #6679
KAG-722