Unverified Commit 347fa30b authored by justcoding121's avatar justcoding121 Committed by GitHub

Merge pull request #419 from justcoding121/master

Beta
parents 79542b52 7ac94c88
......@@ -3,6 +3,7 @@ using System.Net;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Titanium.Web.Proxy.Helpers;
using Titanium.Web.Proxy.Helpers.WinHttp;
using Titanium.Web.Proxy.Models;
namespace Titanium.Web.Proxy.UnitTests
{
......
......@@ -11,11 +11,11 @@ namespace Titanium.Web.Proxy
/// <summary>
/// Call back to override server certificate validation
/// </summary>
/// <param name="sender"></param>
/// <param name="certificate"></param>
/// <param name="chain"></param>
/// <param name="sslPolicyErrors"></param>
/// <returns></returns>
/// <param name="sender">The sender object.</param>
/// <param name="certificate">The remote certificate.</param>
/// <param name="chain">The certificate chain.</param>
/// <param name="sslPolicyErrors">Ssl policy errors</param>
/// <returns>Return true if valid certificate.</returns>
internal bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain,
SslPolicyErrors sslPolicyErrors)
{
......@@ -47,11 +47,11 @@ namespace Titanium.Web.Proxy
/// <summary>
/// Call back to select client certificate used for mutual authentication
/// </summary>
/// <param name="sender"></param>
/// <param name="targetHost"></param>
/// <param name="localCertificates"></param>
/// <param name="remoteCertificate"></param>
/// <param name="acceptableIssuers"></param>
/// <param name="sender">The sender.</param>
/// <param name="targetHost">The remote hostname.</param>
/// <param name="localCertificates">Selected local certificates by SslStream.</param>
/// <param name="remoteCertificate">The remote certificate of server.</param>
/// <param name="acceptableIssuers">The acceptable issues for client certificate as listed by server.</param>
/// <returns></returns>
internal X509Certificate SelectClientCertificate(object sender, string targetHost,
X509CertificateCollection localCertificates,
......
......@@ -16,7 +16,8 @@ namespace Titanium.Web.Proxy.EventArguments
}
/// <summary>
/// The server name indication hostname if available. Otherwise the generic certificate hostname of TransparentEndPoint.
/// The server name indication hostname if available. Otherwise the generic certificate hostname of
/// TransparentEndPoint.
/// </summary>
public string SniHostName { get; internal set; }
......
......@@ -21,10 +21,10 @@ namespace Titanium.Web.Proxy.EventArguments
/// </summary>
protected readonly int BufferSize;
protected readonly ExceptionHandler ExceptionFunc;
internal readonly CancellationTokenSource CancellationTokenSource;
protected readonly ExceptionHandler ExceptionFunc;
/// <summary>
/// Constructor to initialize the proxy
/// </summary>
......
......@@ -35,7 +35,8 @@ namespace Titanium.Web.Proxy.EventArguments
/// </summary>
public bool IsHttpsConnect
{
get => isHttpsConnect ?? throw new Exception("The value of this property is known in the BeforeTunnectConnectResponse event");
get => isHttpsConnect ??
throw new Exception("The value of this property is known in the BeforeTunnectConnectResponse event");
internal set => isHttpsConnect = value;
}
}
......
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Security;
using System.Net.Sockets;
......@@ -25,9 +24,9 @@ namespace Titanium.Web.Proxy
/// This is called when client is aware of proxy
/// So for HTTPS requests client would send CONNECT header to negotiate a secure tcp tunnel via proxy
/// </summary>
/// <param name="endPoint"></param>
/// <param name="tcpClient"></param>
/// <returns></returns>
/// <param name="endPoint">The explicit endpoint.</param>
/// <param name="tcpClient">The client.</param>
/// <returns>The task.</returns>
private async Task HandleClient(ExplicitProxyEndPoint endPoint, TcpClient tcpClient)
{
var cancellationTokenSource = new CancellationTokenSource();
......@@ -90,7 +89,8 @@ namespace Titanium.Web.Proxy
}
//send the response
await clientStreamWriter.WriteResponseAsync(connectArgs.WebSession.Response, cancellationToken: cancellationToken);
await clientStreamWriter.WriteResponseAsync(connectArgs.WebSession.Response,
cancellationToken: cancellationToken);
return;
}
......@@ -99,7 +99,8 @@ namespace Titanium.Web.Proxy
await endPoint.InvokeBeforeTunnectConnectResponse(this, connectArgs, ExceptionFunc);
//send the response
await clientStreamWriter.WriteResponseAsync(connectArgs.WebSession.Response, cancellationToken: cancellationToken);
await clientStreamWriter.WriteResponseAsync(connectArgs.WebSession.Response,
cancellationToken: cancellationToken);
return;
}
......@@ -212,7 +213,8 @@ namespace Titanium.Web.Proxy
{
// clientStream.Available sbould be at most BufferSize because it is using the same buffer size
await clientStream.ReadAsync(data, 0, available, cancellationToken);
await connection.StreamWriter.WriteAsync(data, 0, available, true, cancellationToken);
await connection.StreamWriter.WriteAsync(data, 0, available, true,
cancellationToken);
}
finally
{
......@@ -220,7 +222,8 @@ namespace Titanium.Web.Proxy
}
}
var serverHelloInfo = await SslTools.PeekServerHello(connection.Stream, cancellationToken);
var serverHelloInfo =
await SslTools.PeekServerHello(connection.Stream, cancellationToken);
((ConnectResponse)connectArgs.WebSession.Response).ServerHelloInfo = serverHelloInfo;
}
......@@ -242,13 +245,22 @@ namespace Titanium.Web.Proxy
{
// HTTP/2 Connection Preface
string line = await clientStreamReader.ReadLineAsync(cancellationToken);
if (line != string.Empty) throw new Exception($"HTTP/2 Protocol violation. Empty string expected, '{line}' received");
if (line != string.Empty)
{
throw new Exception($"HTTP/2 Protocol violation. Empty string expected, '{line}' received");
}
line = await clientStreamReader.ReadLineAsync(cancellationToken);
if (line != "SM") throw new Exception($"HTTP/2 Protocol violation. 'SM' expected, '{line}' received");
if (line != "SM")
{
throw new Exception($"HTTP/2 Protocol violation. 'SM' expected, '{line}' received");
}
line = await clientStreamReader.ReadLineAsync(cancellationToken);
if (line != string.Empty) throw new Exception($"HTTP/2 Protocol violation. Empty string expected, '{line}' received");
if (line != string.Empty)
{
throw new Exception($"HTTP/2 Protocol violation. Empty string expected, '{line}' received");
}
//create new connection
using (var connection = await GetServerConnection(connectArgs, true, cancellationToken))
......@@ -268,7 +280,8 @@ namespace Titanium.Web.Proxy
//Now create the request
await HandleHttpSessionRequest(endPoint, tcpClient, clientStream, clientStreamReader,
clientStreamWriter, cancellationTokenSource, connectHostname, connectArgs?.WebSession.ConnectRequest);
clientStreamWriter, cancellationTokenSource, connectHostname,
connectArgs?.WebSession.ConnectRequest);
}
catch (ProxyHttpException e)
{
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections.Generic;
using System.Net.Security;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using StreamExtended;
......@@ -13,7 +10,8 @@ namespace Titanium.Web.Proxy.Extensions
{
internal static class SslExtensions
{
internal static readonly List<SslApplicationProtocol> Http11ProtocolAsList = new List<SslApplicationProtocol> { SslApplicationProtocol.Http11 };
internal static readonly List<SslApplicationProtocol> Http11ProtocolAsList =
new List<SslApplicationProtocol> { SslApplicationProtocol.Http11 };
internal static string GetServerName(this ClientHelloInfo clientHelloInfo)
{
......@@ -60,14 +58,18 @@ namespace Titanium.Web.Proxy.Extensions
return Http11ProtocolAsList;
}
internal static Task AuthenticateAsClientAsync(this SslStream sslStream, SslClientAuthenticationOptions option, CancellationToken token)
internal static Task AuthenticateAsClientAsync(this SslStream sslStream, SslClientAuthenticationOptions option,
CancellationToken token)
{
return sslStream.AuthenticateAsClientAsync(option.TargetHost, option.ClientCertificates, option.EnabledSslProtocols, option.CertificateRevocationCheckMode != X509RevocationMode.NoCheck);
return sslStream.AuthenticateAsClientAsync(option.TargetHost, option.ClientCertificates,
option.EnabledSslProtocols, option.CertificateRevocationCheckMode != X509RevocationMode.NoCheck);
}
internal static Task AuthenticateAsServerAsync(this SslStream sslStream, SslServerAuthenticationOptions options, CancellationToken token)
internal static Task AuthenticateAsServerAsync(this SslStream sslStream, SslServerAuthenticationOptions options,
CancellationToken token)
{
return sslStream.AuthenticateAsServerAsync(options.ServerCertificate, options.ClientCertificateRequired, options.EnabledSslProtocols, options.CertificateRevocationCheckMode != X509RevocationMode.NoCheck);
return sslStream.AuthenticateAsServerAsync(options.ServerCertificate, options.ClientCertificateRequired,
options.EnabledSslProtocols, options.CertificateRevocationCheckMode != X509RevocationMode.NoCheck);
}
#endif
}
......@@ -75,7 +77,8 @@ namespace Titanium.Web.Proxy.Extensions
#if !NETCOREAPP2_1
internal enum SslApplicationProtocol
{
Http11, Http2
Http11,
Http2
}
internal class SslClientAuthenticationOptions
......
......@@ -35,7 +35,8 @@ namespace Titanium.Web.Proxy.Helpers
/// <param name="description">The HTTP status description.</param>
/// <param name="cancellationToken">Optional cancellation token for this async task.</param>
/// <returns>The Task.</returns>
internal Task WriteResponseStatusAsync(Version version, int code, string description, CancellationToken cancellationToken)
internal Task WriteResponseStatusAsync(Version version, int code, string description,
CancellationToken cancellationToken)
{
return WriteLineAsync(Response.CreateResponseLine(version, code, description), cancellationToken);
}
......
......@@ -98,7 +98,8 @@ namespace Titanium.Web.Proxy.Helpers
/// <param name="flush"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
internal async Task WriteHeadersAsync(HeaderCollection headers, bool flush = true, CancellationToken cancellationToken = default)
internal async Task WriteHeadersAsync(HeaderCollection headers, bool flush = true,
CancellationToken cancellationToken = default)
{
foreach (var header in headers)
{
......@@ -121,7 +122,8 @@ namespace Titanium.Web.Proxy.Helpers
}
}
internal async Task WriteAsync(byte[] data, int offset, int count, bool flush, CancellationToken cancellationToken = default)
internal async Task WriteAsync(byte[] data, int offset, int count, bool flush,
CancellationToken cancellationToken = default)
{
await WriteAsync(data, offset, count, cancellationToken);
if (flush)
......@@ -202,7 +204,8 @@ namespace Titanium.Web.Proxy.Helpers
/// <param name="onCopy"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
private async Task CopyBodyChunkedAsync(CustomBinaryReader reader, Action<byte[], int, int> onCopy, CancellationToken cancellationToken)
private async Task CopyBodyChunkedAsync(CustomBinaryReader reader, Action<byte[], int, int> onCopy,
CancellationToken cancellationToken)
{
while (true)
{
......@@ -242,7 +245,8 @@ namespace Titanium.Web.Proxy.Helpers
/// <param name="onCopy"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
private async Task CopyBytesFromStream(CustomBinaryReader reader, long count, Action<byte[], int, int> onCopy, CancellationToken cancellationToken)
private async Task CopyBytesFromStream(CustomBinaryReader reader, long count, Action<byte[], int, int> onCopy,
CancellationToken cancellationToken)
{
var buffer = reader.Buffer;
long remainingBytes = count;
......@@ -276,7 +280,8 @@ namespace Titanium.Web.Proxy.Helpers
/// <param name="flush"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
protected async Task WriteAsync(RequestResponseBase requestResponse, bool flush = true, CancellationToken cancellationToken = default)
protected async Task WriteAsync(RequestResponseBase requestResponse, bool flush = true,
CancellationToken cancellationToken = default)
{
var body = requestResponse.CompressBodyAndUpdateContentLength();
await WriteHeadersAsync(requestResponse.Headers, flush, cancellationToken);
......
......@@ -44,7 +44,7 @@ namespace Titanium.Web.Proxy.Helpers
}
/// <summary>
/// <see href="https://msdn.microsoft.com/en-us/library/aa366896.aspx"/>
/// <see href="https://msdn.microsoft.com/en-us/library/aa366896.aspx" />
/// </summary>
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct Tcp6Row
......
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Titanium.Web.Proxy.Models;
namespace Titanium.Web.Proxy.Helpers
{
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Titanium.Web.Proxy.Helpers
namespace Titanium.Web.Proxy.Helpers
{
internal class Ref<T>
{
......@@ -21,7 +15,7 @@ namespace Titanium.Web.Proxy.Helpers
public override string ToString()
{
T value = Value;
var value = Value;
return value == null ? string.Empty : value.ToString();
}
......
using System;
using System.Runtime.InteropServices;
#if NETSTANDARD2_0
using System.Runtime.InteropServices;
#endif
namespace Titanium.Web.Proxy.Helpers
{
/// <summary>
......@@ -19,8 +21,8 @@ namespace Titanium.Web.Proxy.Helpers
/// cache for Windows platform check
/// </summary>
/// <returns></returns>
private static readonly Lazy<bool> isRunningOnWindows = new Lazy<bool>(() => RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
private static readonly Lazy<bool> isRunningOnWindows
= new Lazy<bool>(() => RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
#endif
/// <summary>
......
using System;
using System.Linq;
using Microsoft.Win32;
using Titanium.Web.Proxy.Models;
// Helper classes for setting system proxy settings
namespace Titanium.Web.Proxy.Helpers
{
[Flags]
public enum ProxyProtocolType
{
/// <summary>
/// The none
/// </summary>
None = 0,
/// <summary>
/// HTTP
/// </summary>
Http = 1,
/// <summary>
/// HTTPS
/// </summary>
Https = 2,
/// <summary>
/// Both HTTP and HTTPS
/// </summary>
AllHttp = Http | Https
}
internal class HttpSystemProxyValue
{
......
......@@ -41,7 +41,7 @@ namespace Titanium.Web.Proxy.Helpers
if (ipVersion == IpVersion.Ipv4)
{
NativeMethods.TcpRow* rowPtr = (NativeMethods.TcpRow*)(tcpTable + 4);
var rowPtr = (NativeMethods.TcpRow*)(tcpTable + 4);
for (int i = 0; i < rowCount; ++i)
{
......@@ -55,7 +55,7 @@ namespace Titanium.Web.Proxy.Helpers
}
else
{
NativeMethods.Tcp6Row* rowPtr = (NativeMethods.Tcp6Row*)(tcpTable + 4);
var rowPtr = (NativeMethods.Tcp6Row*)(tcpTable + 4);
for (int i = 0; i < rowCount; ++i)
{
......@@ -276,9 +276,11 @@ namespace Titanium.Web.Proxy.Helpers
//Now async relay all server=>client & client=>server data
var sendRelay =
CopyHttp2FrameAsync(clientStream, serverStream, onDataSend, bufferSize, connectionId, cancellationTokenSource.Token);
CopyHttp2FrameAsync(clientStream, serverStream, onDataSend, bufferSize, connectionId,
cancellationTokenSource.Token);
var receiveRelay =
CopyHttp2FrameAsync(serverStream, clientStream, onDataReceive, bufferSize, connectionId, cancellationTokenSource.Token);
CopyHttp2FrameAsync(serverStream, clientStream, onDataReceive, bufferSize, connectionId,
cancellationTokenSource.Token);
await Task.WhenAny(sendRelay, receiveRelay);
cancellationTokenSource.Cancel();
......@@ -302,7 +304,8 @@ namespace Titanium.Web.Proxy.Helpers
int length = (headerBuffer[0] << 16) + (headerBuffer[1] << 8) + headerBuffer[2];
byte type = headerBuffer[3];
byte flags = headerBuffer[4];
int streamId = ((headerBuffer[5] & 0x7f) << 24) + (headerBuffer[6] << 16) + (headerBuffer[7] << 8) + headerBuffer[8];
int streamId = ((headerBuffer[5] & 0x7f) << 24) + (headerBuffer[6] << 16) + (headerBuffer[7] << 8) +
headerBuffer[8];
read = await ForceRead(input, buffer, 0, length, cancellationToken);
if (read != length)
......@@ -321,7 +324,8 @@ namespace Titanium.Web.Proxy.Helpers
}
}
private static async Task<int> ForceRead(Stream input, byte[] buffer, int offset, int bytesToRead, CancellationToken cancellationToken)
private static async Task<int> ForceRead(Stream input, byte[] buffer, int offset, int bytesToRead,
CancellationToken cancellationToken)
{
int totalRead = 0;
while (bytesToRead > 0)
......
......@@ -8,7 +8,8 @@ namespace Titanium.Web.Proxy.Http
{
internal static class HeaderParser
{
internal static async Task ReadHeaders(CustomBinaryReader reader, HeaderCollection headerCollection, CancellationToken cancellationToken)
internal static async Task ReadHeaders(CustomBinaryReader reader, HeaderCollection headerCollection,
CancellationToken cancellationToken)
{
string tmpLine;
while (!string.IsNullOrEmpty(tmpLine = await reader.ReadLineAsync(cancellationToken)))
......
......@@ -80,7 +80,8 @@ namespace Titanium.Web.Proxy.Http
/// Prepare and send the http(s) request
/// </summary>
/// <returns></returns>
internal async Task SendRequest(bool enable100ContinueBehaviour, bool isTransparent, CancellationToken cancellationToken)
internal async Task SendRequest(bool enable100ContinueBehaviour, bool isTransparent,
CancellationToken cancellationToken)
{
var upstreamProxy = ServerConnection.UpStreamProxy;
......
using System;
namespace Titanium.Web.Proxy.Models
{
[Flags]
public enum ProxyProtocolType
{
/// <summary>
/// The none
/// </summary>
None = 0,
/// <summary>
/// HTTP
/// </summary>
Http = 1,
/// <summary>
/// HTTPS
/// </summary>
Https = 2,
/// <summary>
/// Both HTTP and HTTPS
/// </summary>
AllHttp = Http | Https
}
}
......@@ -60,13 +60,18 @@ namespace Titanium.Web.Proxy.Network
/// <summary>
///
/// </summary>
/// <param name="rootCertificateName"></param>
/// <param name="rootCertificateIssuerName"></param>
/// <param name="userTrustRootCertificate">Should fake HTTPS certificate be trusted by this machine's user certificate store?</param>
/// <param name="userTrustRootCertificate">
/// Should fake HTTPS certificate be trusted by this machine's user certificate
/// store?
/// </param>
/// <param name="machineTrustRootCertificate">Should fake HTTPS certificate be trusted by this machine's certificate store?</param>
/// <param name="trustRootCertificateAsAdmin">Should we attempt to trust certificates with elevated permissions by prompting for UAC if required?</param>
/// <param name="trustRootCertificateAsAdmin">
/// Should we attempt to trust certificates with elevated permissions by
/// prompting for UAC if required?
/// </param>
/// <param name="exceptionFunc"></param>
internal CertificateManager(string rootCertificateName, string rootCertificateIssuerName,
bool userTrustRootCertificate, bool machineTrustRootCertificate, bool trustRootCertificateAsAdmin,
......@@ -639,7 +644,10 @@ namespace Titanium.Web.Proxy.Network
/// named as "rootCert.pfx" (and will be saved in proxy dll directory).
/// </param>
/// <param name="password">Set a password for the .pfx file.</param>
/// <param name="overwritePfXFile">true : replace an existing .pfx file if password is incorect or if RootCertificate==null.</param>
/// <param name="overwritePfXFile">
/// true : replace an existing .pfx file if password is incorect or if
/// RootCertificate==null.
/// </param>
/// <param name="storageFlag"></param>
/// <returns>
/// true if succeeded, else false.
......@@ -765,9 +773,15 @@ namespace Titanium.Web.Proxy.Network
/// Also makes root certificate trusted based on provided parameters.
/// Note:setting machineTrustRootCertificate to true will force userTrustRootCertificate to true.
/// </summary>
/// <param name="userTrustRootCertificate">Should fake HTTPS certificate be trusted by this machine's user certificate store?</param>
/// <param name="userTrustRootCertificate">
/// Should fake HTTPS certificate be trusted by this machine's user certificate
/// store?
/// </param>
/// <param name="machineTrustRootCertificate">Should fake HTTPS certificate be trusted by this machine's certificate store?</param>
/// <param name="trustRootCertificateAsAdmin">Should we attempt to trust certificates with elevated permissions by prompting for UAC if required?</param>
/// <param name="trustRootCertificateAsAdmin">
/// Should we attempt to trust certificates with elevated permissions by
/// prompting for UAC if required?
/// </param>
public void EnsureRootCertificate(bool userTrustRootCertificate,
bool machineTrustRootCertificate, bool trustRootCertificateAsAdmin = false)
{
......
......@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Net;
using System.Net.Security;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using StreamExtended.Network;
......@@ -35,7 +34,8 @@ namespace Titanium.Web.Proxy.Network.Tcp
/// <returns></returns>
internal async Task<TcpConnection> CreateClient(string remoteHostName, int remotePort,
List<SslApplicationProtocol> applicationProtocols, Version httpVersion, bool decryptSsl, bool isConnect,
ProxyServer proxyServer, IPEndPoint upStreamEndPoint, ExternalProxy externalProxy, CancellationToken cancellationToken)
ProxyServer proxyServer, IPEndPoint upStreamEndPoint, ExternalProxy externalProxy,
CancellationToken cancellationToken)
{
bool useUpstreamProxy = false;
......@@ -79,7 +79,7 @@ namespace Titanium.Web.Proxy.Network.Tcp
var connectRequest = new ConnectRequest
{
OriginalUrl = $"{remoteHostName}:{remotePort}",
HttpVersion = httpVersion,
HttpVersion = httpVersion
};
connectRequest.Headers.AddHeader(KnownHeaders.Connection, KnownHeaders.ConnectionKeepAlive);
......@@ -87,7 +87,8 @@ namespace Titanium.Web.Proxy.Network.Tcp
if (!string.IsNullOrEmpty(externalProxy.UserName) && externalProxy.Password != null)
{
connectRequest.Headers.AddHeader(HttpHeader.ProxyConnectionKeepAlive);
connectRequest.Headers.AddHeader(HttpHeader.GetProxyAuthorizationHeader(externalProxy.UserName, externalProxy.Password));
connectRequest.Headers.AddHeader(
HttpHeader.GetProxyAuthorizationHeader(externalProxy.UserName, externalProxy.Password));
}
await writer.WriteRequestAsync(connectRequest, cancellationToken: cancellationToken);
......
......@@ -13,8 +13,14 @@ namespace Titanium.Web.Proxy
{
public partial class ProxyServer
{
/// <summary>
/// Callback to authorize clients of this proxy instance.
/// </summary>
/// <param name="session">The session event arguments.</param>
/// <returns>True if authorized.</returns>
private async Task<bool> CheckAuthorization(SessionEventArgsBase session)
{
//If we are not authorizing clients return true
if (AuthenticateUserFunc == null)
{
return true;
......@@ -70,6 +76,11 @@ namespace Titanium.Web.Proxy
}
}
/// <summary>
/// Create an authentication required response.
/// </summary>
/// <param name="description">Response description.</param>
/// <returns></returns>
private Response CreateAuthentication407Response(string description)
{
var response = new Response
......
......@@ -28,6 +28,7 @@ namespace Titanium.Web.Proxy
/// HTTP & HTTPS scheme shorthands.
/// </summary>
internal static readonly string UriSchemeHttp = Uri.UriSchemeHttp;
internal static readonly string UriSchemeHttps = Uri.UriSchemeHttps;
/// <summary>
......@@ -58,9 +59,15 @@ namespace Titanium.Web.Proxy
/// <summary>
/// Initializes a new instance of ProxyServer class with provided parameters.
/// </summary>
/// <param name="userTrustRootCertificate">Should fake HTTPS certificate be trusted by this machine's user certificate store?</param>
/// <param name="userTrustRootCertificate">
/// Should fake HTTPS certificate be trusted by this machine's user certificate
/// store?
/// </param>
/// <param name="machineTrustRootCertificate">Should fake HTTPS certificate be trusted by this machine's certificate store?</param>
/// <param name="trustRootCertificateAsAdmin">Should we attempt to trust certificates with elevated permissions by prompting for UAC if required?</param>
/// <param name="trustRootCertificateAsAdmin">
/// Should we attempt to trust certificates with elevated permissions by
/// prompting for UAC if required?
/// </param>
public ProxyServer(bool userTrustRootCertificate = true, bool machineTrustRootCertificate = false,
bool trustRootCertificateAsAdmin = false) : this(null, null, userTrustRootCertificate,
machineTrustRootCertificate, trustRootCertificateAsAdmin)
......@@ -72,9 +79,15 @@ namespace Titanium.Web.Proxy
/// </summary>
/// <param name="rootCertificateName">Name of the root certificate.</param>
/// <param name="rootCertificateIssuerName">Name of the root certificate issuer.</param>
/// <param name="userTrustRootCertificate">Should fake HTTPS certificate be trusted by this machine's user certificate store?</param>
/// <param name="userTrustRootCertificate">
/// Should fake HTTPS certificate be trusted by this machine's user certificate
/// store?
/// </param>
/// <param name="machineTrustRootCertificate">Should fake HTTPS certificate be trusted by this machine's certificate store?</param>
/// <param name="trustRootCertificateAsAdmin">Should we attempt to trust certificates with elevated permissions by prompting for UAC if required?</param>
/// <param name="trustRootCertificateAsAdmin">
/// Should we attempt to trust certificates with elevated permissions by
/// prompting for UAC if required?
/// </param>
public ProxyServer(string rootCertificateName, string rootCertificateIssuerName,
bool userTrustRootCertificate = true, bool machineTrustRootCertificate = false,
bool trustRootCertificateAsAdmin = false)
......@@ -667,6 +680,10 @@ namespace Titanium.Web.Proxy
endPoint.Listener.Server.Dispose();
}
/// <summary>
/// Update client connection count.
/// </summary>
/// <param name="increment"></param>
internal void UpdateClientConnectionCount(bool increment)
{
if (increment)
......@@ -681,6 +698,10 @@ namespace Titanium.Web.Proxy
ClientConnectionCountChanged?.Invoke(this, EventArgs.Empty);
}
/// <summary>
/// Update server connection count.
/// </summary>
/// <param name="increment"></param>
internal void UpdateServerConnectionCount(bool increment)
{
if (increment)
......
......@@ -27,19 +27,22 @@ namespace Titanium.Web.Proxy
EnableWinAuth && RunTime.IsWindows && !RunTime.IsRunningOnMono;
/// <summary>
/// This is the core request handler method for a particular connection from client
/// This is the core request handler method for a particular connection from client.
/// Will create new session (request/response) sequence until
/// client/server abruptly terminates connection or by normal HTTP termination
/// client/server abruptly terminates connection or by normal HTTP termination.
/// </summary>
/// <param name="client"></param>
/// <param name="clientStream"></param>
/// <param name="clientStreamReader"></param>
/// <param name="clientStreamWriter"></param>
/// <param name="cancellationTokenSource"></param>
/// <param name="httpsConnectHostname"></param>
/// <param name="endPoint"></param>
/// <param name="connectRequest"></param>
/// <param name="isTransparentEndPoint"></param>
/// <param name="endPoint">The proxy endpoint.</param>
/// <param name="client">The client.</param>
/// <param name="clientStream">The client stream.</param>
/// <param name="clientStreamReader">The client stream reader.</param>
/// <param name="clientStreamWriter">The client stream writer.</param>
/// <param name="cancellationTokenSource">The cancellation token source for this async task.</param>
/// <param name="httpsConnectHostname">
/// The https hostname as appeared in CONNECT request if this is a HTTPS request from
/// explicit endpoint.
/// </param>
/// <param name="connectRequest">The Connect request if this is a HTTPS request from explicit endpoint.</param>
/// <param name="isTransparentEndPoint">Is this a request from transparent endpoint?</param>
/// <returns></returns>
private async Task HandleHttpSessionRequest(ProxyEndPoint endPoint, TcpClient client,
CustomBufferedStream clientStream, CustomBinaryReader clientStreamReader,
......@@ -272,9 +275,9 @@ namespace Titanium.Web.Proxy
/// <summary>
/// Handle a specific session (request/response sequence)
/// </summary>
/// <param name="connection"></param>
/// <param name="args"></param>
/// <returns>True if close the connection</returns>
/// <param name="connection">The tcp connection.</param>
/// <param name="args">The session event arguments.</param>
/// <returns></returns>
private async Task HandleHttpSessionRequestInternal(TcpConnection connection, SessionEventArgs args)
{
try
......@@ -290,7 +293,8 @@ namespace Titanium.Web.Proxy
if (request.ExpectContinue)
{
args.WebSession.SetConnection(connection);
await args.WebSession.SendRequest(Enable100ContinueBehaviour, args.IsTransparent, cancellationToken);
await args.WebSession.SendRequest(Enable100ContinueBehaviour, args.IsTransparent,
cancellationToken);
}
//If 100 continue was the response inform that to the client
......@@ -316,7 +320,8 @@ namespace Titanium.Web.Proxy
if (!request.ExpectContinue)
{
args.WebSession.SetConnection(connection);
await args.WebSession.SendRequest(Enable100ContinueBehaviour, args.IsTransparent, cancellationToken);
await args.WebSession.SendRequest(Enable100ContinueBehaviour, args.IsTransparent,
cancellationToken);
}
//check if content-length is > 0
......@@ -353,13 +358,14 @@ namespace Titanium.Web.Proxy
}
/// <summary>
/// Create a Server Connection
/// Create a server connection.
/// </summary>
/// <param name="args"></param>
/// <param name="isConnect"></param>
/// <param name="cancellationToken"></param>
/// <param name="args">The session event arguments.</param>
/// <param name="isConnect">Is this a CONNECT request.</param>
/// <param name="cancellationToken">The cancellation token for this async task.</param>
/// <returns></returns>
private async Task<TcpConnection> GetServerConnection(SessionEventArgsBase args, bool isConnect, CancellationToken cancellationToken)
private async Task<TcpConnection> GetServerConnection(SessionEventArgsBase args, bool isConnect,
CancellationToken cancellationToken)
{
ExternalProxy customUpStreamProxy = null;
......@@ -382,7 +388,7 @@ namespace Titanium.Web.Proxy
}
/// <summary>
/// prepare the request headers so that we can avoid encodings not parsable by this proxy
/// Prepare the request headers so that we can avoid encodings not parsable by this proxy
/// </summary>
/// <param name="requestHeaders"></param>
private void PrepareRequestHeaders(HeaderCollection requestHeaders)
......@@ -395,6 +401,11 @@ namespace Titanium.Web.Proxy
requestHeaders.FixProxyHeaders();
}
/// <summary>
/// Invoke before request handler if it is set.
/// </summary>
/// <param name="args">The session event arguments.</param>
/// <returns></returns>
private async Task InvokeBeforeRequest(SessionEventArgs args)
{
if (BeforeRequest != null)
......
......@@ -9,15 +9,15 @@ using Titanium.Web.Proxy.Network.WinAuth.Security;
namespace Titanium.Web.Proxy
{
/// <summary>
/// Handle the response from server
/// Handle the response from server.
/// </summary>
partial class ProxyServer
{
/// <summary>
/// Called asynchronously when a request was successfully and we received the response
/// Called asynchronously when a request was successfully and we received the response.
/// </summary>
/// <param name="args"></param>
/// <returns>true if client/server connection was terminated (and disposed) </returns>
/// <param name="args">The session event arguments.</param>
/// <returns> The task.</returns>
private async Task HandleHttpSessionResponse(SessionEventArgs args)
{
try
......@@ -118,7 +118,8 @@ namespace Titanium.Web.Proxy
//Write body if exists
if (response.HasBody)
{
await args.CopyResponseBodyAsync(clientStreamWriter, TransformationMode.None, cancellationToken);
await args.CopyResponseBodyAsync(clientStreamWriter, TransformationMode.None,
cancellationToken);
}
}
}
......@@ -128,6 +129,11 @@ namespace Titanium.Web.Proxy
}
}
/// <summary>
/// Invoke before response if it is set.
/// </summary>
/// <param name="args"></param>
/// <returns></returns>
private async Task InvokeBeforeResponse(SessionEventArgs args)
{
if (BeforeResponse != null)
......@@ -136,6 +142,11 @@ namespace Titanium.Web.Proxy
}
}
/// <summary>
/// Invoke after response if it is set.
/// </summary>
/// <param name="args"></param>
/// <returns></returns>
private async Task InvokeAfterResponse(SessionEventArgs args)
{
if (AfterResponse != null)
......
......@@ -17,11 +17,11 @@ namespace Titanium.Web.Proxy
partial class ProxyServer
{
/// <summary>
/// This is called when this proxy acts as a reverse proxy (like a real http server)
/// This is called when this proxy acts as a reverse proxy (like a real http server).
/// So for HTTPS requests we would start SSL negotiation right away without expecting a CONNECT request from client
/// </summary>
/// <param name="endPoint"></param>
/// <param name="tcpClient"></param>
/// <param name="endPoint">The transparent endpoint.</param>
/// <param name="tcpClient">The client.</param>
/// <returns></returns>
private async Task HandleClient(TransparentProxyEndPoint endPoint, TcpClient tcpClient)
{
......@@ -44,8 +44,11 @@ namespace Titanium.Web.Proxy
{
httpsHostName = clientHelloInfo.GetServerName() ?? endPoint.GenericCertificateName;
var args = new BeforeSslAuthenticateEventArgs(cancellationTokenSource);
args.SniHostName = httpsHostName;
var args = new BeforeSslAuthenticateEventArgs(cancellationTokenSource)
{
SniHostName = httpsHostName
};
await endPoint.InvokeBeforeSslAuthenticate(this, args, ExceptionFunc);
if (cancellationTokenSource.IsCancellationRequested)
......
......@@ -13,7 +13,9 @@ namespace Titanium.Web.Proxy
{
public partial class ProxyServer
{
//possible header names
/// <summary>
/// possible header names.
/// </summary>
private static readonly HashSet<string> authHeaderNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
{
"WWW-Authenticate",
......@@ -24,6 +26,9 @@ namespace Titanium.Web.Proxy
"KerberosAuthorization"
};
/// <summary>
/// supported authentication schemes.
/// </summary>
private static readonly HashSet<string> authSchemes = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
{
"NTLM",
......@@ -32,13 +37,12 @@ namespace Titanium.Web.Proxy
};
/// <summary>
/// Handle windows NTLM authentication
/// Can expand this for Kerberos in future
/// Handle windows NTLM/Kerberos authentication.
/// Note: NTLM/Kerberos cannot do a man in middle operation
/// we do for HTTPS requests.
/// As such we will be sending local credentials of current
/// User to server to authenticate requests.
/// To disable this set ProxyServer.EnableWinAuth to false
/// To disable this set ProxyServer.EnableWinAuth to false.
/// </summary>
internal async Task Handle401UnAuthorized(SessionEventArgs args)
{
......
......@@ -83,7 +83,7 @@
<h1 id="Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs" data-uid="Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs" class="text-break">Class BeforeSslAuthenticateEventArgs
</h1>
<div class="markdown level0 summary"><p>This is used in transparent endpoint before authenticating client. </p>
<div class="markdown level0 summary"><p>This is used in transparent endpoint before authenticating client.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
......@@ -159,7 +159,8 @@ If false we relay the connection to the hostname mentioned in SniHostname.</p>
<a id="Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs_SniHostName_" data-uid="Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.SniHostName*"></a>
<h4 id="Titanium_Web_Proxy_EventArguments_BeforeSslAuthenticateEventArgs_SniHostName" data-uid="Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.SniHostName">SniHostName</h4>
<div class="markdown level1 summary"><p>The server name indication hostname if available. Otherwise the generic certificate hostname of TransparentEndPoint.</p>
<div class="markdown level1 summary"><p>The server name indication hostname if available. Otherwise the generic certificate hostname of
TransparentEndPoint.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
......
......@@ -88,7 +88,7 @@
<h3 id="classes">Classes
</h3>
<h4><a class="xref" href="Titanium.Web.Proxy.EventArguments.BeforeSslAuthenticateEventArgs.html">BeforeSslAuthenticateEventArgs</a></h4>
<section><p>This is used in transparent endpoint before authenticating client. </p>
<section><p>This is used in transparent endpoint before authenticating client.</p>
</section>
<h4><a class="xref" href="Titanium.Web.Proxy.EventArguments.CertificateSelectionEventArgs.html">CertificateSelectionEventArgs</a></h4>
<section><p>An argument passed on to user for client certificate selection during mutual SSL authentication.</p>
......
......@@ -508,7 +508,8 @@ Note:setting machineTrustRootCertificate to true will force userTrustRootCertifi
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
<td><span class="parametername">userTrustRootCertificate</span></td>
<td><p>Should fake HTTPS certificate be trusted by this machine&apos;s user certificate store?</p>
<td><p>Should fake HTTPS certificate be trusted by this machine&apos;s user certificate
store?</p>
</td>
</tr>
<tr>
......@@ -520,7 +521,8 @@ Note:setting machineTrustRootCertificate to true will force userTrustRootCertifi
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
<td><span class="parametername">trustRootCertificateAsAdmin</span></td>
<td><p>Should we attempt to trust certificates with elevated permissions by prompting for UAC if required?</p>
<td><p>Should we attempt to trust certificates with elevated permissions by
prompting for UAC if required?</p>
</td>
</tr>
</tbody>
......@@ -640,7 +642,8 @@ named as &quot;rootCert.pfx&quot; (and will be saved in proxy dll directory).</p
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
<td><span class="parametername">overwritePfXFile</span></td>
<td><p>true : replace an existing .pfx file if password is incorect or if RootCertificate==null.</p>
<td><p>true : replace an existing .pfx file if password is incorect or if
RootCertificate==null.</p>
</td>
</tr>
<tr>
......
......@@ -84,7 +84,7 @@
<h1 id="Titanium_Web_Proxy_ProxyServer" data-uid="Titanium.Web.Proxy.ProxyServer" class="text-break">Class ProxyServer
</h1>
<div class="markdown level0 summary"><p>This object is the backbone of proxy. One can create as many instances as needed.
However care should be taken to avoid using the same listening ports across multiple instances. </p>
However care should be taken to avoid using the same listening ports across multiple instances.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
......@@ -152,7 +152,8 @@ However care should be taken to avoid using the same listening ports across mult
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
<td><span class="parametername">userTrustRootCertificate</span></td>
<td><p>Should fake HTTPS certificate be trusted by this machine&apos;s user certificate store?</p>
<td><p>Should fake HTTPS certificate be trusted by this machine&apos;s user certificate
store?</p>
</td>
</tr>
<tr>
......@@ -164,7 +165,8 @@ However care should be taken to avoid using the same listening ports across mult
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
<td><span class="parametername">trustRootCertificateAsAdmin</span></td>
<td><p>Should we attempt to trust certificates with elevated permissions by prompting for UAC if required?</p>
<td><p>Should we attempt to trust certificates with elevated permissions by
prompting for UAC if required?</p>
</td>
</tr>
</tbody>
......@@ -205,7 +207,8 @@ However care should be taken to avoid using the same listening ports across mult
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
<td><span class="parametername">userTrustRootCertificate</span></td>
<td><p>Should fake HTTPS certificate be trusted by this machine&apos;s user certificate store?</p>
<td><p>Should fake HTTPS certificate be trusted by this machine&apos;s user certificate
store?</p>
</td>
</tr>
<tr>
......@@ -217,7 +220,8 @@ However care should be taken to avoid using the same listening ports across mult
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.boolean">Boolean</a></td>
<td><span class="parametername">trustRootCertificateAsAdmin</span></td>
<td><p>Should we attempt to trust certificates with elevated permissions by prompting for UAC if required?</p>
<td><p>Should we attempt to trust certificates with elevated permissions by
prompting for UAC if required?</p>
</td>
</tr>
</tbody>
......@@ -794,7 +798,7 @@ Defaults via any IP addresses of this machine.</p>
<a id="Titanium_Web_Proxy_ProxyServer_DisableSystemProxy_" data-uid="Titanium.Web.Proxy.ProxyServer.DisableSystemProxy*"></a>
<h4 id="Titanium_Web_Proxy_ProxyServer_DisableSystemProxy_Titanium_Web_Proxy_Helpers_ProxyProtocolType_" data-uid="Titanium.Web.Proxy.ProxyServer.DisableSystemProxy(Titanium.Web.Proxy.Helpers.ProxyProtocolType)">DisableSystemProxy(ProxyProtocolType)</h4>
<h4 id="Titanium_Web_Proxy_ProxyServer_DisableSystemProxy_ProxyProtocolType_" data-uid="Titanium.Web.Proxy.ProxyServer.DisableSystemProxy(ProxyProtocolType)">DisableSystemProxy(ProxyProtocolType)</h4>
<div class="markdown level1 summary"><p>Clear the specified proxy setting for current machine.</p>
</div>
<div class="markdown level1 conceptual"></div>
......@@ -813,7 +817,7 @@ Defaults via any IP addresses of this machine.</p>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Titanium.Web.Proxy.Helpers.ProxyProtocolType.html">ProxyProtocolType</a></td>
<td><span class="xref">ProxyProtocolType</span></td>
<td><span class="parametername">protocolType</span></td>
<td></td>
</tr>
......@@ -919,7 +923,7 @@ Will throw error if the end point does&apos;nt exist</p>
<a id="Titanium_Web_Proxy_ProxyServer_SetAsSystemProxy_" data-uid="Titanium.Web.Proxy.ProxyServer.SetAsSystemProxy*"></a>
<h4 id="Titanium_Web_Proxy_ProxyServer_SetAsSystemProxy_Titanium_Web_Proxy_Models_ExplicitProxyEndPoint_Titanium_Web_Proxy_Helpers_ProxyProtocolType_" data-uid="Titanium.Web.Proxy.ProxyServer.SetAsSystemProxy(Titanium.Web.Proxy.Models.ExplicitProxyEndPoint,Titanium.Web.Proxy.Helpers.ProxyProtocolType)">SetAsSystemProxy(ExplicitProxyEndPoint, ProxyProtocolType)</h4>
<h4 id="Titanium_Web_Proxy_ProxyServer_SetAsSystemProxy_Titanium_Web_Proxy_Models_ExplicitProxyEndPoint_ProxyProtocolType_" data-uid="Titanium.Web.Proxy.ProxyServer.SetAsSystemProxy(Titanium.Web.Proxy.Models.ExplicitProxyEndPoint,ProxyProtocolType)">SetAsSystemProxy(ExplicitProxyEndPoint, ProxyProtocolType)</h4>
<div class="markdown level1 summary"><p>Set the given explicit end point as the default proxy server for current machine.</p>
</div>
<div class="markdown level1 conceptual"></div>
......@@ -943,7 +947,7 @@ Will throw error if the end point does&apos;nt exist</p>
<td></td>
</tr>
<tr>
<td><a class="xref" href="Titanium.Web.Proxy.Helpers.ProxyProtocolType.html">ProxyProtocolType</a></td>
<td><span class="xref">ProxyProtocolType</span></td>
<td><span class="parametername">protocolType</span></td>
<td></td>
</tr>
......
......@@ -89,7 +89,7 @@
</h3>
<h4><a class="xref" href="Titanium.Web.Proxy.ProxyServer.html">ProxyServer</a></h4>
<section><p>This object is the backbone of proxy. One can create as many instances as needed.
However care should be taken to avoid using the same listening ports across multiple instances. </p>
However care should be taken to avoid using the same listening ports across multiple instances.</p>
</section>
<h3 id="delegates">Delegates
</h3>
......
......@@ -74,15 +74,6 @@
<a href="Titanium.Web.Proxy.Exceptions.ProxyHttpException.html" name="" title="ProxyHttpException">ProxyHttpException</a>
</li>
</ul> </li>
<li>
<span class="expand-stub"></span>
<a href="Titanium.Web.Proxy.Helpers.html" name="" title="Titanium.Web.Proxy.Helpers">Titanium.Web.Proxy.Helpers</a>
<ul class="nav level2">
<li>
<a href="Titanium.Web.Proxy.Helpers.ProxyProtocolType.html" name="" title="ProxyProtocolType">ProxyProtocolType</a>
</li>
</ul> </li>
<li>
<span class="expand-stub"></span>
<a href="Titanium.Web.Proxy.Http.html" name="" title="Titanium.Web.Proxy.Http">Titanium.Web.Proxy.Http</a>
......
......@@ -79,16 +79,6 @@
"title": "Class ProxyHttpException | Titanium Web Proxy",
"keywords": "Class ProxyHttpException Proxy HTTP exception. Inheritance Object Exception ProxyException ProxyHttpException Implements ISerializable _Exception Inherited Members Exception.GetBaseException() Exception.ToString() Exception.GetObjectData(SerializationInfo, StreamingContext) Exception.GetType() Exception.Message Exception.Data Exception.InnerException Exception.TargetSite Exception.StackTrace Exception.HelpLink Exception.Source Exception.HResult Exception.SerializeObjectState Object.Equals(Object) Object.Equals(Object, Object) Object.ReferenceEquals(Object, Object) Object.GetHashCode() Object.MemberwiseClone() Namespace : Titanium.Web.Proxy.Exceptions Assembly : Titanium.Web.Proxy.dll Syntax public class ProxyHttpException : ProxyException, ISerializable, _Exception Properties SessionEventArgs Gets session info associated to the exception. Declaration public SessionEventArgs SessionEventArgs { get; } Property Value Type Description SessionEventArgs Remarks This object properties should not be edited. Implements System.Runtime.Serialization.ISerializable System.Runtime.InteropServices._Exception"
},
"api/Titanium.Web.Proxy.Helpers.html": {
"href": "api/Titanium.Web.Proxy.Helpers.html",
"title": "Namespace Titanium.Web.Proxy.Helpers | Titanium Web Proxy",
"keywords": "Namespace Titanium.Web.Proxy.Helpers Enums ProxyProtocolType"
},
"api/Titanium.Web.Proxy.Helpers.ProxyProtocolType.html": {
"href": "api/Titanium.Web.Proxy.Helpers.ProxyProtocolType.html",
"title": "Enum ProxyProtocolType | Titanium Web Proxy",
"keywords": "Enum ProxyProtocolType Namespace : Titanium.Web.Proxy.Helpers Assembly : Titanium.Web.Proxy.dll Syntax [Flags] public enum ProxyProtocolType Fields Name Description AllHttp Both HTTP and HTTPS Http HTTP Https HTTPS None The none"
},
"api/Titanium.Web.Proxy.html": {
"href": "api/Titanium.Web.Proxy.html",
"title": "Namespace Titanium.Web.Proxy | Titanium Web Proxy",
......
......@@ -848,42 +848,6 @@ references:
isSpec: "True"
fullName: Titanium.Web.Proxy.Exceptions.ProxyHttpException.SessionEventArgs
nameWithType: ProxyHttpException.SessionEventArgs
- uid: Titanium.Web.Proxy.Helpers
name: Titanium.Web.Proxy.Helpers
href: api/Titanium.Web.Proxy.Helpers.html
commentId: N:Titanium.Web.Proxy.Helpers
fullName: Titanium.Web.Proxy.Helpers
nameWithType: Titanium.Web.Proxy.Helpers
- uid: Titanium.Web.Proxy.Helpers.ProxyProtocolType
name: ProxyProtocolType
href: api/Titanium.Web.Proxy.Helpers.ProxyProtocolType.html
commentId: T:Titanium.Web.Proxy.Helpers.ProxyProtocolType
fullName: Titanium.Web.Proxy.Helpers.ProxyProtocolType
nameWithType: ProxyProtocolType
- uid: Titanium.Web.Proxy.Helpers.ProxyProtocolType.AllHttp
name: AllHttp
href: api/Titanium.Web.Proxy.Helpers.ProxyProtocolType.html#Titanium_Web_Proxy_Helpers_ProxyProtocolType_AllHttp
commentId: F:Titanium.Web.Proxy.Helpers.ProxyProtocolType.AllHttp
fullName: Titanium.Web.Proxy.Helpers.ProxyProtocolType.AllHttp
nameWithType: ProxyProtocolType.AllHttp
- uid: Titanium.Web.Proxy.Helpers.ProxyProtocolType.Http
name: Http
href: api/Titanium.Web.Proxy.Helpers.ProxyProtocolType.html#Titanium_Web_Proxy_Helpers_ProxyProtocolType_Http
commentId: F:Titanium.Web.Proxy.Helpers.ProxyProtocolType.Http
fullName: Titanium.Web.Proxy.Helpers.ProxyProtocolType.Http
nameWithType: ProxyProtocolType.Http
- uid: Titanium.Web.Proxy.Helpers.ProxyProtocolType.Https
name: Https
href: api/Titanium.Web.Proxy.Helpers.ProxyProtocolType.html#Titanium_Web_Proxy_Helpers_ProxyProtocolType_Https
commentId: F:Titanium.Web.Proxy.Helpers.ProxyProtocolType.Https
fullName: Titanium.Web.Proxy.Helpers.ProxyProtocolType.Https
nameWithType: ProxyProtocolType.Https
- uid: Titanium.Web.Proxy.Helpers.ProxyProtocolType.None
name: None
href: api/Titanium.Web.Proxy.Helpers.ProxyProtocolType.html#Titanium_Web_Proxy_Helpers_ProxyProtocolType_None
commentId: F:Titanium.Web.Proxy.Helpers.ProxyProtocolType.None
fullName: Titanium.Web.Proxy.Helpers.ProxyProtocolType.None
nameWithType: ProxyProtocolType.None
- uid: Titanium.Web.Proxy.Http
name: Titanium.Web.Proxy.Http
href: api/Titanium.Web.Proxy.Http.html
......@@ -2786,11 +2750,11 @@ references:
isSpec: "True"
fullName: Titanium.Web.Proxy.ProxyServer.DisableSystemHttpsProxy
nameWithType: ProxyServer.DisableSystemHttpsProxy
- uid: Titanium.Web.Proxy.ProxyServer.DisableSystemProxy(Titanium.Web.Proxy.Helpers.ProxyProtocolType)
- uid: Titanium.Web.Proxy.ProxyServer.DisableSystemProxy(ProxyProtocolType)
name: DisableSystemProxy(ProxyProtocolType)
href: api/Titanium.Web.Proxy.ProxyServer.html#Titanium_Web_Proxy_ProxyServer_DisableSystemProxy_Titanium_Web_Proxy_Helpers_ProxyProtocolType_
commentId: M:Titanium.Web.Proxy.ProxyServer.DisableSystemProxy(Titanium.Web.Proxy.Helpers.ProxyProtocolType)
fullName: Titanium.Web.Proxy.ProxyServer.DisableSystemProxy(Titanium.Web.Proxy.Helpers.ProxyProtocolType)
href: api/Titanium.Web.Proxy.ProxyServer.html#Titanium_Web_Proxy_ProxyServer_DisableSystemProxy_ProxyProtocolType_
commentId: M:Titanium.Web.Proxy.ProxyServer.DisableSystemProxy(ProxyProtocolType)
fullName: Titanium.Web.Proxy.ProxyServer.DisableSystemProxy(ProxyProtocolType)
nameWithType: ProxyServer.DisableSystemProxy(ProxyProtocolType)
- uid: Titanium.Web.Proxy.ProxyServer.DisableSystemProxy*
name: DisableSystemProxy
......@@ -2980,11 +2944,11 @@ references:
isSpec: "True"
fullName: Titanium.Web.Proxy.ProxyServer.SetAsSystemHttpsProxy
nameWithType: ProxyServer.SetAsSystemHttpsProxy
- uid: Titanium.Web.Proxy.ProxyServer.SetAsSystemProxy(Titanium.Web.Proxy.Models.ExplicitProxyEndPoint,Titanium.Web.Proxy.Helpers.ProxyProtocolType)
- uid: Titanium.Web.Proxy.ProxyServer.SetAsSystemProxy(Titanium.Web.Proxy.Models.ExplicitProxyEndPoint,ProxyProtocolType)
name: SetAsSystemProxy(ExplicitProxyEndPoint, ProxyProtocolType)
href: api/Titanium.Web.Proxy.ProxyServer.html#Titanium_Web_Proxy_ProxyServer_SetAsSystemProxy_Titanium_Web_Proxy_Models_ExplicitProxyEndPoint_Titanium_Web_Proxy_Helpers_ProxyProtocolType_
commentId: M:Titanium.Web.Proxy.ProxyServer.SetAsSystemProxy(Titanium.Web.Proxy.Models.ExplicitProxyEndPoint,Titanium.Web.Proxy.Helpers.ProxyProtocolType)
fullName: Titanium.Web.Proxy.ProxyServer.SetAsSystemProxy(Titanium.Web.Proxy.Models.ExplicitProxyEndPoint, Titanium.Web.Proxy.Helpers.ProxyProtocolType)
href: api/Titanium.Web.Proxy.ProxyServer.html#Titanium_Web_Proxy_ProxyServer_SetAsSystemProxy_Titanium_Web_Proxy_Models_ExplicitProxyEndPoint_ProxyProtocolType_
commentId: M:Titanium.Web.Proxy.ProxyServer.SetAsSystemProxy(Titanium.Web.Proxy.Models.ExplicitProxyEndPoint,ProxyProtocolType)
fullName: Titanium.Web.Proxy.ProxyServer.SetAsSystemProxy(Titanium.Web.Proxy.Models.ExplicitProxyEndPoint, ProxyProtocolType)
nameWithType: ProxyServer.SetAsSystemProxy(ExplicitProxyEndPoint, ProxyProtocolType)
- uid: Titanium.Web.Proxy.ProxyServer.SetAsSystemProxy*
name: SetAsSystemProxy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment