Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit e826d81

Browse files
committed
readme format
1 parent d8139ff commit e826d81

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,14 @@ Setup HTTP proxy:
4444
ExcludedHttpsHostNameRegex = new List<string>() { "dropbox.com" }
4545
};
4646

47-
//An explicit endpoint is where the client knows about the existance of proxy
47+
//Exclude Https addresses you don't want to proxy
48+
//Usefull for clients that use certificate pinning
49+
//for example dropbox.com
50+
var explicitEndPoint = new ExplicitProxyEndPoint(IPAddress.Any, 8000, true){
51+
ExcludedHttpsHostNameRegex = new List<string>() { "dropbox.com" }
52+
};
53+
54+
//An explicit endpoint is where the client knows about the existance of a proxy
4855
//So client sends request in a proxy friendly manner
4956
ProxyServer.AddEndPoint(explicitEndPoint);
5057
ProxyServer.Start();
@@ -57,12 +64,15 @@ Setup HTTP proxy:
5764
//In this example only google.com will work for HTTPS requests
5865
//Other sites will receive a certificate mismatch warning on browser
5966
//Please read about it before asking questions!
60-
var transparentEndPoint = new TransparentProxyEndPoint(IPAddress.Any, 8001, true) { GenericCertificateName = "google.com"};
67+
var transparentEndPoint = new TransparentProxyEndPoint(IPAddress.Any, 8001, true) {
68+
GenericCertificateName = "google.com"
69+
};
6170
ProxyServer.AddEndPoint(transparentEndPoint);
6271

6372

6473
foreach (var endPoint in ProxyServer.ProxyEndPoints)
65-
Console.WriteLine("Listening on '{0}' endpoint at Ip {1} and port: {2} ", endPoint.GetType().Name, endPoint.IpAddress, endPoint.Port);
74+
Console.WriteLine("Listening on '{0}' endpoint at Ip {1} and port: {2} ",
75+
endPoint.GetType().Name, endPoint.IpAddress, endPoint.Port);
6676

6777
//You can also add/remove end points after proxy has been started
6878
ProxyServer.RemoveEndPoint(transparentEndPoint);

Titanium.Web.Proxy.Test/ProxyTestController.cs

+5-3
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ public void StartProxy()
3636
//In this example only google.com will work for HTTPS requests
3737
//Other sites will receive a certificate mismatch warning on browser
3838
//Please read about it before asking questions!
39-
var transparentEndPoint = new TransparentProxyEndPoint(IPAddress.Any, 8001, true) { GenericCertificateName = "google.com"};
39+
var transparentEndPoint = new TransparentProxyEndPoint(IPAddress.Any, 8001, true) {
40+
GenericCertificateName = "google.com"
41+
};
4042
ProxyServer.AddEndPoint(transparentEndPoint);
4143

4244

4345
foreach (var endPoint in ProxyServer.ProxyEndPoints)
44-
Console.WriteLine("Listening on '{0}' endpoint at Ip {1} and port: {2} ", endPoint.GetType().Name, endPoint.IpAddress, endPoint.Port);
46+
Console.WriteLine("Listening on '{0}' endpoint at Ip {1} and port: {2} ",
47+
endPoint.GetType().Name, endPoint.IpAddress, endPoint.Port);
4548

4649
//You can also add/remove end points after proxy has been started
4750
ProxyServer.RemoveEndPoint(transparentEndPoint);
@@ -59,7 +62,6 @@ public void Stop()
5962
ProxyServer.Stop();
6063
}
6164

62-
6365
//Test On Request, intecept requests
6466
//Read browser URL send back to proxy by the injection script in OnResponse event
6567
public void OnRequest(object sender, SessionEventArgs e)

0 commit comments

Comments
 (0)