forked from anthonyreilly/NetCoreForce
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomProxy.cs
More file actions
33 lines (29 loc) · 685 Bytes
/
CustomProxy.cs
File metadata and controls
33 lines (29 loc) · 685 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Net;
namespace NetCoreForce.Client
{
/// <summary>
/// Very basic implementation of IWebProxy
/// </summary>
public class CustomProxy : IWebProxy
{
private Uri _proxyUri;
public Uri GetProxy(Uri destination)
{
return _proxyUri;
}
public bool IsBypassed(Uri host)
{
return false;
}
public ICredentials Credentials { get; set; }
public CustomProxy(string proxyUrl)
{
this._proxyUri = new Uri(proxyUrl);
}
public CustomProxy(Uri proxyUri)
{
this._proxyUri = proxyUri;
}
}
}