-
Notifications
You must be signed in to change notification settings - Fork 230
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
WithProxy is ignored #658
Comments
This issue must have been fixed by PR #641 (Reuse HttpClient and fix the wrong TLS and Proxy settings during MinioClient creation). |
I'm pretty sure this PR doesn't fix the issue @chrisbecke reported. I also experienced this following the documentation. For example: var client = new MinioClient()
.WithEndpoint(this.Settings.S3Endpoint)
.WithCredentials(
this.Settings.S3AccessKey,
this.Settings.S3SecretKey)
.WithProxy(new WebProxy(this.Settings.HttpProxyUri))
.WithSSL(); Doesn't apply the proxy settings. Directly supplying a HttpClient with a proxy set does appear to work: var httpClientHandler = new HttpClientHandler()
{
Proxy = new WebProxy(this.Settings.HttpProxyUri)
};
var client = new MinioClient()
.WithEndpoint(this.Settings.S3Endpoint)
.WithCredentials(
this.Settings.S3AccessKey,
this.Settings.S3SecretKey)
.WithProxy(new WebProxy(this.Settings.HttpProxyUri))
.WithHttpClient(new HttpClient(httpClientHandler));
.WithSSL(); Which is a valid workaround, but the docs suggest setting the proxy alone should be effective. |
Thank you @alexwlsnr |
@chrisbecke , |
* Created when there is still no HttpClient available during Build(). * WithHttpClient(HttpClient) adds parameter bool disposeHttpClient = false to indicate whether to dispose httpClient. * Fix unit tests * run "cleanupcode minio.sln"
Fixed by #683 |
Issue
We upgraded our own project to the net6.0 framework, and that included upgrading the minio-dotnet SDK to version 4.0.4 As a consequence of this update the Minio SDK now seems to be ignoring .WithProxy().
To get minio-dotnet to route traffic via a proxy it now seems necessary to use WithHttpClient.
To Reproduce
.WithProxy
is never used, but.WithHttpClient()
does route through the proxy.docker-compose.yml
Program.cs
proxy/index.js
proxy/Dockerfile
In summary these were the steps I used to create the projects and run the test scenarios.
The text was updated successfully, but these errors were encountered: