Skip to content

Support standard proxy mode in test-proxy#11958

Merged
scbedd merged 26 commits intomainfrom
native-proxy-support
Sep 16, 2025
Merged

Support standard proxy mode in test-proxy#11958
scbedd merged 26 commits intomainfrom
native-proxy-support

Conversation

@scbedd
Copy link
Copy Markdown
Member

@scbedd scbedd commented Sep 4, 2025

First step of #6177

todo:

  • Successfully get a recording using the new standard proxy mode
  • Ensure existing standard mode fixed everywhere
  • Add a couple of tests checking new functionality
  • Readme updates
  • Respond to PR feedback
  • REmove stopUniversal or startUniversal. They're unnecessary given that we have the static configuration accessible from startup.cs
  • Fix failing recorded tests

@scbedd scbedd moved this from 🤔 Triage to 🔬 Dev in PR in Azure SDK EngSys 🚀🌒🧑‍🚀 Sep 9, 2025
@scbedd scbedd moved this from 🔬 Dev in PR to 🐝 Dev in Azure SDK EngSys 🚀🌒🧑‍🚀 Sep 9, 2025
@scbedd scbedd self-assigned this Sep 9, 2025
@scbedd scbedd marked this pull request as ready for review September 11, 2025 19:31
Copilot AI review requested due to automatic review settings September 11, 2025 19:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces support for standard proxy mode in the test-proxy tool, enabling it to function as a regular HTTP proxy without requiring special request headers. The implementation adds a new command-line flag --standard-proxy-mode and introduces universal recording endpoints that maintain global recording state instead of requiring session-specific headers.

  • Adds --standard-proxy-mode command-line option to enable standard HTTP proxy behavior
  • Implements universal recording endpoints (StartUniversal/StopUniversal) for simplified recording management
  • Adds middleware to handle absolute-form HTTP proxy requests and route them appropriately based on proxy mode

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
try-proxied-requests.ps1 Updates test script to use standard proxy mode and universal recording endpoints
Startup.cs Adds proxy configuration management and middleware for handling absolute-form requests
RecordingHandler.cs Updates URI resolution logic to handle standard proxy requests vs legacy Azure mode
Record.cs Adds universal recording endpoints and updates request handling for different proxy modes
launchSettings.json Updates default launch configuration to use standard proxy mode
ServerRecordingConfiguration.cs New model class defining proxy modes and recording configuration
StartOptions.cs Adds StandardProxyMode property to command-line options
OptionsGenerator.cs Adds --standard-proxy-mode command-line option definition

Comment thread tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs Outdated
Comment thread tools/test-proxy/Azure.Sdk.Tools.TestProxy/Record.cs Outdated
Comment thread tools/test-proxy/Azure.Sdk.Tools.TestProxy/Record.cs Outdated
Comment thread tools/test-proxy/Azure.Sdk.Tools.TestProxy/Record.cs Outdated
Comment thread tools/test-proxy/Azure.Sdk.Tools.TestProxy/Record.cs Outdated
Comment thread tools/test-proxy/Azure.Sdk.Tools.TestProxy/Record.cs Outdated
Comment thread tools/test-proxy/Azure.Sdk.Tools.TestProxy/Startup.cs Outdated
Comment thread tools/test-proxy/Azure.Sdk.Tools.TestProxy/CommandOptions/OptionsGenerator.cs Outdated
Comment thread tools/test-proxy/Azure.Sdk.Tools.TestProxy/Record.cs Outdated
@scbedd scbedd requested a review from a team as a code owner September 15, 2025 22:53
@scbedd scbedd merged commit aec3143 into main Sep 16, 2025
11 checks passed
@scbedd scbedd deleted the native-proxy-support branch September 16, 2025 00:44
@github-project-automation github-project-automation Bot moved this from 🐝 Dev to 🔬 Dev in PR in Azure SDK EngSys 🚀🌒🧑‍🚀 Sep 16, 2025
@kurtzeborn kurtzeborn moved this from 🔬 Dev in PR to 🎊 Closed in Azure SDK EngSys 🚀🌒🧑‍🚀 Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants