Commit 770d4850 authored by justcoding121's avatar justcoding121 Committed by justcoding121

Merge pull request #243 from justcoding121/develop

Merge with beta
parents ed5d5e74 79e804c4
...@@ -17,8 +17,7 @@ Features ...@@ -17,8 +17,7 @@ Features
* Safely relays Web Socket requests over HTTP * Safely relays Web Socket requests over HTTP
* Support mutual SSL authentication * Support mutual SSL authentication
* Fully asynchronous proxy * Fully asynchronous proxy
* Supports proxy authentication * Supports proxy authentication & automatic proxy detection
Usage Usage
===== =====
...@@ -204,10 +203,8 @@ public Task OnCertificateSelection(object sender, CertificateSelectionEventArgs ...@@ -204,10 +203,8 @@ public Task OnCertificateSelection(object sender, CertificateSelectionEventArgs
``` ```
Future road map (Pull requests are welcome!) Future road map (Pull requests are welcome!)
============ ============
* Implement Kerberos/NTLM authentication over HTTP protocols for windows domain
* Support Server Name Indication (SNI) for transparent endpoints * Support Server Name Indication (SNI) for transparent endpoints
* Support HTTP 2.0 * Support HTTP 2.0
* Support upstream AutoProxy detection
* Support SOCKS protocol * Support SOCKS protocol
* Implement Kerberos/NTLM authentication over HTTP protocols for windows domain
...@@ -21,7 +21,7 @@ namespace Titanium.Web.Proxy.Models ...@@ -21,7 +21,7 @@ namespace Titanium.Web.Proxy.Models
/// <summary> /// <summary>
/// Bypass this proxy for connections to localhost? /// Bypass this proxy for connections to localhost?
/// </summary> /// </summary>
public bool BypassForLocalhost { get; set; } public bool BypassLocalhost { get; set; }
/// <summary> /// <summary>
/// Username. /// Username.
......
...@@ -39,10 +39,37 @@ namespace Titanium.Web.Proxy.Network.Tcp ...@@ -39,10 +39,37 @@ namespace Titanium.Web.Proxy.Network.Tcp
TcpClient client; TcpClient client;
CustomBufferedStream stream; CustomBufferedStream stream;
bool isLocalhost = (externalHttpsProxy != null || externalHttpProxy != null) && NetworkHelper.IsLocalIpAddress(remoteHostName);
bool useHttpProxy = false;
//check if external proxy is set for HTTP
if (!isHttps && externalHttpProxy != null
&& externalHttpProxy.HostName != remoteHostName)
{
useHttpProxy = true;
//check if we need to ByPass
if (externalHttpProxy.BypassLocalhost
&& NetworkHelper.IsLocalIpAddress(remoteHostName))
{
useHttpProxy = false;
}
}
bool useHttpsProxy = externalHttpsProxy != null && externalHttpsProxy.HostName != remoteHostName && externalHttpsProxy.BypassForLocalhost && !isLocalhost; bool useHttpsProxy = false;
bool useHttpProxy = externalHttpProxy != null && externalHttpProxy.HostName != remoteHostName && externalHttpProxy.BypassForLocalhost && !isLocalhost; //check if external proxy is set for HTTPS
if (isHttps && externalHttpsProxy != null
&& externalHttpsProxy.HostName != remoteHostName)
{
useHttpsProxy = true;
//check if we need to ByPass
if (externalHttpsProxy.BypassLocalhost
&& NetworkHelper.IsLocalIpAddress(remoteHostName))
{
useHttpsProxy = false;
}
}
if (isHttps) if (isHttps)
{ {
......
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