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

WebDAV access behind a proxy #50

Open
juapepa opened this issue Mar 28, 2020 · 2 comments
Open

WebDAV access behind a proxy #50

juapepa opened this issue Mar 28, 2020 · 2 comments
Labels

Comments

@juapepa
Copy link

juapepa commented Mar 28, 2020

We want to upload WebDAV files using this .NET API. However, in order to connect to our WebDAV server, we are required to use a proxy (with authentication). Could this library work behind a proxy?

Thank you in advance

@skazantsev
Copy link
Owner

Hi @juapepa ,

There a few ways to set up a proxy when instantiating WebDavClient:

  1. You can pass an WebProxy to WebDevClientParams.
  2. You can pass a pre-configured instance of HttpClient to WebDavClient.

here is a code example:

var clientParams = new WebDavClientParams
{
    BaseAddress = new Uri("..."),
    UseProxy = true,
    Proxy = new WebProxy(...)
};
using var client = new WebDavClient(clientParams);

@ngost
Copy link

ngost commented Oct 18, 2023

When using Socks5 proxy, WebProxy Class not work on .Net 4.x, 5.x ..

Can create proxy class for socks5 using like HttpToSocks5Proxy.1.4.0 in nuget pakages.

example,
HttpToSocks5Proxy httpToSocks5Proxy = new HttpToSocks5Proxy("127.0.0.1", xxxx);
proxy = httpToSocks5Proxy;

and, HttpToSocks5Proxy class is implement IWebProxy Class.

Useful under .Net 6 framework like unity platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants