Intercept requests based on context paths#10
Merged
erickjung merged 7 commits intoFarfetch:masterfrom Nov 3, 2021
Merged
Conversation
erickjung
approved these changes
Oct 28, 2021
franciscoamado
approved these changes
Nov 3, 2021
erickjung
approved these changes
Nov 3, 2021
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.
PR Details
Up until now the mitmproxy was intercepting all network traffic which caused issues when trying to perform other network activities with Mockingbird activated.
With these changes, we'll leverage the
--allow-hostsoption to solely intercept requests with the path for the context selected. This will allow any user to use internet freely on their device when filtering requests according to their requestDescription
mitm-on.shscript to start themitmdump_mbexecutable with the--allow-hostsoption depending on the selected context statusContextManager(no longer needed since this is being done at the mitmproxy levelProcessObjectandrunAsyncsince we're no longer launching executables directly from the source codeMotivation and Context
In our teams, a painpoint that we felt a lot was the loss of all network connection when we simply wanted to intercept requests based on a determined context.
How Has This Been Tested
After applying these changes, I ran the Mockingbird app several times with no context applied or with context applied (with single or multiple paths). While in the first scenario all traffic is targeted and any activity using internet traffic is halted, in the second scenario only the traffic that is targeted by the context is intercepted and the user can work with the remaining activities.
Types of changes
Checklist
Disclaimer
By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement