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 support for no_proxy environment variable for .NET Framework target. #3200

Merged
merged 1 commit into from Feb 27, 2024

Conversation

normj
Copy link
Member

@normj normj commented Feb 27, 2024

Description

A previous PR added support for .NET Framework to honor the https_proxy and http_proxy environment variables. Some users need to exclude the use of the https_proxy via the no_proxy. In particular when running in a private VPC with some endpoints using VPC endpoints and other request going through a proxy.

The full implementation of no_proxy would involve DNS resolution to IP address and CIDR matching. That is a much larger scope to integrate into the SDK and for the SDK's use cases unlikely to be needed. This implementation does host name matching with wildcard support matching the Java and Kotlin SDK's implementation.

Motivation and Context

Issue 3198

Testing

Add new unit tests and have manually verified making service calls with a bad proxy set in the https_proxy and the request failed then when the no_proxy environment variable was set the request was successful.

Internal dry run was successful.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@dscpinheiro dscpinheiro changed the base branch from main to main-staging February 27, 2024 12:25
The .NET Core targets rely on the .NET runtime to process the no_proxy environment variable.
@normj normj merged commit ac08855 into main-staging Feb 27, 2024
@normj normj deleted the normj/noproxy branch February 27, 2024 16:15
@dscpinheiro dscpinheiro linked an issue Feb 27, 2024 that may be closed by this pull request
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.

no_proxy environment variable is not respected
3 participants