Open asinthe1 opened 4 years ago
Yes, you can set any upstream proxy... you don't have to use the windows proxy settings. Moreover you can use different upsteream proxy for each request (for example by url or for load balancing reason)
thanks for the quick reply can you please direct me to sample code
thanks and best regards
You can find the sample code here: https://github.com/justcoding121/Titanium-Web-Proxy/blob/master/examples/Titanium.Web.Proxy.Examples.Basic/ProxyTestController.cs
Check the following properties:
UpStreamHttpProxy, UpStreamHttpsProxy, GetCustomUpStreamProxyFunc
Thanks for your reply i try like this var proxyServer = new ProxyServer(); proxyServer.UpStreamHttpProxy = new ExternalProxy("192.168.1.2", 808); proxyServer.UpStreamHttpsProxy = new ExternalProxy("192.168.1.2", 808);
its works fine for all traffic but if i want external proxy for specific sites for eg: facebook.com how to implement that i try OnRequest method like this if (e.HttpClient.Request.RequestUri.AbsoluteUri.Contains("facebook.com")) { e.CustomUpStreamProxy = new ExternalProxy("192.168.1.12", 808); }
then its not working is there any option to do that
and is there any option to use a gateway instead of proxy
thank you very much and best regards
Is your code at least called?
yes its called i try in debug mode and object e.CustomUpStreamProxy has new value as well
Is there any option to use another gateway for the proxy server without using the default gateway in windows
thanks