#if !BESTHTTP_DISABLE_PROXY
using System;
using BestHTTP.Authentication;
namespace BestHTTP
{
public sealed class HTTPProxy
{
///
/// Address of the proxy server. It has to be in the http://proxyaddress:port form.
///
public Uri Address { get; set; }
///
/// Credentials of the proxy
///
public Credentials Credentials { get; set; }
///
/// True if the proxy can act as a transparent proxy
///
public bool IsTransparent { get; set; }
///
/// Some non-transparent proxies are except only the path and query of the request uri. Default value is true
///
public bool SendWholeUri { get; set; }
///
/// Regardless of the value of IsTransparent, for secure protocols(HTTPS://, WSS://) the plugin will use the proxy as an explicit proxy(will issue a CONNECT request to the proxy)
///
public bool NonTransparentForHTTPS { get; set; }
public HTTPProxy(Uri address)
:this(address, null, false)
{}
public HTTPProxy(Uri address, Credentials credentials)
:this(address, credentials, false)
{}
public HTTPProxy(Uri address, Credentials credentials, bool isTransparent)
:this(address, credentials, isTransparent, true)
{ }
public HTTPProxy(Uri address, Credentials credentials, bool isTransparent, bool sendWholeUri)
: this(address, credentials, isTransparent, true, true)
{ }
public HTTPProxy(Uri address, Credentials credentials, bool isTransparent, bool sendWholeUri, bool nonTransparentForHTTPS)
{
this.Address = address;
this.Credentials = credentials;
this.IsTransparent = isTransparent;
this.SendWholeUri = sendWholeUri;
this.NonTransparentForHTTPS = nonTransparentForHTTPS;
}
}
}
#endif