@@ -44,7 +44,14 @@ Setup HTTP proxy:
44
44
ExcludedHttpsHostNameRegex = new List <string >() { " dropbox.com" }
45
45
};
46
46
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
48
55
// So client sends request in a proxy friendly manner
49
56
ProxyServer .AddEndPoint (explicitEndPoint );
50
57
ProxyServer .Start ();
@@ -57,12 +64,15 @@ Setup HTTP proxy:
57
64
// In this example only google.com will work for HTTPS requests
58
65
// Other sites will receive a certificate mismatch warning on browser
59
66
// 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
+ };
61
70
ProxyServer .AddEndPoint (transparentEndPoint );
62
71
63
72
64
73
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 );
66
76
67
77
// You can also add/remove end points after proxy has been started
68
78
ProxyServer .RemoveEndPoint (transparentEndPoint );
0 commit comments