@@ -49,21 +49,24 @@ Setup HTTP proxy:
49
49
ProxyServer .AddEndPoint (explicitEndPoint );
50
50
ProxyServer .Start ();
51
51
52
- // You can also add/remove end points after proxy has been started
53
- // Transparent endpoint is usefull for reverse proxying
52
+
53
+ // Transparent endpoint is usefull for reverse proxying (client is not aware of the existance of proxy)
54
54
// A transparent endpoint usually requires a network router port forwarding HTTP(S) packets to this endpoint
55
- // Please read about it before asking questions!
56
- // Currently do not support Server Name Indication (SNI is not currently supported by SslStream class)
55
+ // Currently do not support Server Name Indication (It is not currently supported by SslStream class)
57
56
// That means that the transparent endpoint will always provide the same Generic Certificate to all HTTPS requests
58
57
// In this example only google.com will work for HTTPS requests
59
58
// Other sites will receive a certificate mismatch warning on browser
59
+ // Please read about it before asking questions!
60
60
var transparentEndPoint = new TransparentProxyEndPoint (IPAddress .Any , 8001 , true ) { GenericCertificateName = " google.com" };
61
61
ProxyServer .AddEndPoint (transparentEndPoint );
62
- ProxyServer . RemoveEndPoint ( transparentEndPoint );
62
+
63
63
64
64
foreach (var endPoint in ProxyServer .ProxyEndPoints )
65
65
Console .WriteLine (" Listening on '{0}' endpoint at Ip {1} and port: {2} " , endPoint .GetType ().Name , endPoint .IpAddress , endPoint .Port );
66
66
67
+ // You can also add/remove end points after proxy has been started
68
+ ProxyServer .RemoveEndPoint (transparentEndPoint );
69
+
67
70
// Only explicit proxies can be set as system proxy!
68
71
ProxyServer .SetAsSystemHttpProxy (explicitEndPoint );
69
72
ProxyServer .SetAsSystemHttpsProxy (explicitEndPoint );
0 commit comments