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

Add a mitmMutateRequest hook and add ConnectAction to ProxyCtx #27

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

harold-stripe
Copy link

This PR adds 2 things

  • A hook that enables the caller code to mutate the request via a hook. I've tested this working on smokescreen and added a test.
  • Setting ConnectAction in ProxyCtx. proxy.OnRequest().DoFunc is called on the MITM request (the outbound one from goproxy to the remote host) and adding this variable makes it easy to know if target is a "traditional" HTTP Proxy of if the MITM request.

@CLAassistant
Copy link

CLAassistant commented Sep 5, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

@cds2-stripe cds2-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@harold-stripe harold-stripe merged commit 906e92b into master Sep 9, 2024
5 checks passed
@harold-stripe harold-stripe deleted the harold/mitmMutateRequestHook branch September 9, 2024 16:13
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

Successfully merging this pull request may close these issues.

4 participants