Skip to content

SNOW-1333163: Add support for default proxy configuration #917

@vc-74

Description

@vc-74

What is the current behavior?

The current HttpUtil implementation allows 2 scenarios:

  • Explicitly set proxy by specifying useproxy, proxyhost... in the connection string
  • Ignore proxy parameters in which case a proxy will never be used

This does not allow the default proxy scenarios, for instance:

  • Getting proxy configuration from environment variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY...)
  • On Windows, getting proxy configuration from WinInet, which is the only scenario supporting PAC scripts AFAIK

What is the desired behavior?

Since HttpClientHandler.UseProxy defaults to true and not specifying HttpClientHandler.Proxy will use the default proxy by default:

  • If useproxy is true and proxy parameters are specified (proxyhost...) set HttpClientHandler.Proxy --> already available
  • If useproxy is false, set HttpClientHandler.UseProxy to false --> already available
  • If useproxy is true and no proxy parameters are specified (proxyhost...) leave HttpClientHandler.Proxy to its default value --> not available today

How would this improve snowflake-connector-net?

This would allow proxy settings from environment variables, PAC scripts... to be used to connect to Snowflake.

References, Other Background

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions