Commit cc9e7826 authored by titanium007's avatar titanium007

update readme; build number

parent f26c5605
...@@ -21,7 +21,7 @@ if(!$Configuration) { $Configuration = $env:Configuration } ...@@ -21,7 +21,7 @@ if(!$Configuration) { $Configuration = $env:Configuration }
if(!$Configuration) { $Configuration = "Release" } if(!$Configuration) { $Configuration = "Release" }
if(!$Version) { $Version = $env:APPVEYOR_BUILD_VERSION } if(!$Version) { $Version = $env:APPVEYOR_BUILD_VERSION }
if(!$Version) { $Version = "1.0.$BuildNumber" } if(!$Version) { $Version = "2.0.$BuildNumber" }
if(!$Branch) { $Branch = $env:APPVEYOR_REPO_BRANCH } if(!$Branch) { $Branch = $env:APPVEYOR_REPO_BRANCH }
if(!$Branch) { $Branch = "local" } if(!$Branch) { $Branch = "local" }
......
...@@ -36,11 +36,22 @@ Setup HTTP proxy: ...@@ -36,11 +36,22 @@ Setup HTTP proxy:
// listen to client request & server response events // listen to client request & server response events
ProxyServer.BeforeRequest += OnRequest; ProxyServer.BeforeRequest += OnRequest;
ProxyServer.BeforeResponse += OnResponse; ProxyServer.BeforeResponse += OnResponse;
//Exclude Https addresses you don't want to proxy
//Usefull for clients that use certificate pinning
//for example dropbox.com
var explicitEndPoint = new ExplicitProxyEndPoint(IPAddress.Loopback, 8000, true){
ExcludedHostNameRegex = new List<string>() { "dropbox.com" }
};
ProxyServer.EnableSSL = true; var transparentEndPoint = new TransparentProxyEndPoint(IPAddress.Loopback, 8001, true);
ProxyServer.SetAsSystemProxy = true;
ProxyServer.Start(); ProxyServer.AddEndPoint(explicitEndPoint);
ProxyServer.AddEndPoint(transparentEndPoint);
ProxyServer.Start();
ProxyServer.SetAsSystemProxy(explicitEndPoint);
//wait here (You can use something else as a wait function, I am using this as a demo) //wait here (You can use something else as a wait function, I am using this as a demo)
Console.Read(); Console.Read();
......
...@@ -23,9 +23,7 @@ namespace Titanium.Web.Proxy.Test ...@@ -23,9 +23,7 @@ namespace Titanium.Web.Proxy.Test
ExcludedHostNameRegex = new List<string>() { "dropbox.com" } ExcludedHostNameRegex = new List<string>() { "dropbox.com" }
}; };
var transparentEndPoint = new TransparentProxyEndPoint(IPAddress.Loopback, 8001, true) var transparentEndPoint = new TransparentProxyEndPoint(IPAddress.Loopback, 8001, true);
{
};
ProxyServer.AddEndPoint(explicitEndPoint); ProxyServer.AddEndPoint(explicitEndPoint);
ProxyServer.AddEndPoint(transparentEndPoint); ProxyServer.AddEndPoint(transparentEndPoint);
......
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