Implement outbound HTTP connection blocking#256
Merged
Conversation
timokoessler
reviewed
Mar 9, 2026
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
timokoessler
approved these changes
Mar 9, 2026
To lookup the domain by connection host only once.
15b0c8c to
5893049
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change implement the outbound connection blocking feature.
The
simpleidngem has been added as anaikido-zendependency, in order to convert Punycode-encoded domains to Unicode and correctly retrieve the domain settings for domains that contain Unicode characters provided by Aikido Core.The change begins with a switch from thread-local to fiber-local storage to store the current context.
Fiberis patched to add theaikido_current_contextinstance variable and accessors.Fiber.newis patched so thataikido_current_contextis automatically copied from the currentFiberinto the newFiber. This is necessary so that libraries that create Fibers that may execute on another thread can access the current context. The current context is necessary for checking whether the client IP is in the bypassed IPs set, to bypass connection blocking; but is also necessary to protect from SSRF attacks.This change therefore aims to address an issue in
async-httpwhere the current context is not available because theAsync::Taskwas scheduled/executed by on a thread where the current context has not been set in thread-local storage.Summary by Aikido
🚀 New Features
⚡ Enhancements
🔧 Refactors
More info